全部產品
Search
文件中心

PolarDB:ST_SetTexture

更新時間:Jul 06, 2024

設定sfmesh對象中第N個紋理。

文法

sfmesh ST_SetTexture(sfmesh sfmeshObject, int4 index, texture textureObject);

參數

參數

描述

sfmeshObject

sfmesh對象。

index

紋理索引編號,從0開始。

textureObject

紋理對象。

樣本

SELECT ST_SetTexture(
	'{"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, 
  0, 
  '{"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"}}'::texture
);