返回sfmesh对象中第N个材质。

语法

material  ST_MaterialN(sfmesh sfmeshObject, int4 index);

参数

参数名称描述
sfmeshObjectsfmesh对象。
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