全部產品
Search
文件中心

PolarDB:ST_NumMaterials

更新時間:Jul 06, 2024

返回sfmesh對象中材質的數量。

文法

int4 ST_NumMaterials(sfmesh sfmeshObject);

參數

參數名稱描述
sfmeshObjectsfmesh對象。

描述

返回sfmesh對象中材質的數量。

樣本

select ST_NumMaterials('{   "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);

------------------------------
 1