This topic describes the ST_Translate function. This function translates a meshgeom or sfmesh object based on given values.
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 units of the x coordinate. |
| Yoff | The offset units of the y coordinate. |
| Zoff | The offset units 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)))))