ST_Translate
Updated at:
Offsets `meshgeom` and `sfmesh` objects by a specified value.
Syntax
meshgeom ST_Translate(meshgeom geom, float Xoff, float Yoff, float Zoff);
sfmesh ST_Translate(sfmesh sfmeshObject, float Xoff, float Yoff, float Zoff);Parameters
Parameter | Description |
geom | The meshgeom object. |
sfmeshObject | The sfmesh object. |
Xoff | The offset of the x-coordinate. |
Yoff | The offset of the y-coordinate. |
Zoff | The offset of the z-coordinate. |
Description
This function processes the coordinates of the meshgeom or sfmesh object.
x' = x + Xoff
y' = y + Yoff
z' = z + ZoffExamples
select ST_asText(ST_Translate('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0,0 10,10 10,10 0), INDEX((0,1,2),(1,2,3)))))'::meshgeom, 0.5, 0.8, 2.0));
----------------------------------------------------------------------
MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0.5 0.8,0.5 10.8,10.5 10.8,10.5 0.8),INDEX((0,1,2),(1,2,3)))))
Is this page helpful?