返回sfmesh或material对象中所有纹理的数组。
语法
texture[] ST_Textures(sfmesh sfmeshObject);
texture[] ST_Textures(material material);
参数
参数名称 | 描述 |
---|---|
sfmeshObject | sfmesh对象。 |
material | material对象。 |
描述
返回sfmesh或material对象中所有纹理的数组。
示例
- 示例一:
select ST_Textures('{"meshgeoms" : ["MESHGEOM(PATCH(TRIANGLESTRIP(0 0,0 10,10 10,10 0)))"], "materials":[{"type":"db", "attributes": {"schema":"public","table":"t_material","column":"the_material","key":"num=1"}} ], "textures":[{"compressionType" : "None", "format" : "JPEG", "wrap" : "Wrap", "type" : "DB", "depth" : 3, "width" : 256, "height" : 256, "name" : "texture_name3", "size" : 72, "data" : {"schema":"public","table":"test","column":"the_texture","key":"num=1"}} ],"primitives" : [ {"meshgeom": 0, "material" : 0}], "nodes" : [ {"primitive" : 0} ] }'::sfmesh); ------------------------------ {01010001010303000100000001000005000000123456FFFF}
- 示例二:
-- Array elements by index select (ST_Textures('{"meshgeoms" : ["MESHGEOM(PATCH(TRIANGLESTRIP(0 0,0 10,10 10,10 0)))"], "materials":[{"type":"db", "attributes": {"schema":"public","table":"t_material","column":"the_material","key":"num=1"}} ], "textures":[{"compressionType" : "None", "format" : "JPEG", "wrap" : "Wrap", "type" : "DB", "depth" : 3, "width" : 256, "height" : 256, "name" : "texture_name3", "size" : 72, "data" : {"schema":"public","table":"test","column":"the_texture","key":"num=1"}} ],"primitives" : [ {"meshgeom": 0, "material" : 0}], "nodes" : [ {"primitive" : 0} ] }'::sfmesh))[1]; ---------------- 01010001010303000100000001000005000000123456FFFF