设置sfmesh对象的第N个材质。
语法
sfmesh ST_SetMaterial(sfmesh sfmeshObject, int4 index, material materialObject);
参数
参数 | 描述 |
sfmeshObject | sfmesh对象。 |
index | 材质索引编号,从0开始。 |
materialObject | 材质对象。 |
示例
SELECT ST_SetMaterial(
'{"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,
'{"type":"db","attributes":{"schema":"public","table":"t_material","column":"the_material","key":"num=10"}}'
);
文档内容是否对您有帮助?