返回sfmesh對象中第N個材質。
語法
material ST_MaterialN(sfmesh sfmeshObject, int4 index);
參數
參數名稱 | 描述 |
---|---|
sfmeshObject | sfmesh對象。 |
index | 材質索引編號,從0開始。 |
描述
返回sfmesh對象中第N個材質。
示例
select ST_MaterialN('{ "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"}} ], "primitives" : [ {"meshgeom": 0, "material" : 0}], "nodes" : [ {"primitive" : 0} ] }'::sfmesh, 0);
------------------------------
010102FFDDEEAA