This topic describes the ST_Rotate function. This function rotates a meshgeom or sfmesh object based on a given radian.
Syntax
meshgeom ST_Rotate(meshgeom geom, float angle);
sfmesh ST_Scale(sfmesh sfmeshObject, float angle);Parameters
| Parameter | Description |
|---|---|
| geom | The meshgeom object. |
| sfmeshObject | The sfmesh object. |
| angle | The rotation angle. |
Description
This function rotates an object only on the x-axis or y-axis.
Examples
select ST_asText(ST_Rotate('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 1,0 10 2,10 10 3,10 0 4), INDEX((0,1,2),(1,2,3)))))'::meshgeom, pi()/4));
----------------------------------------------------------------------
MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 1,-7.07106781186547 7.07106781186548 2,0 14.142135623731 3,7.07106781186548 7.07106781186547 4),INDEX((0,1,2),(1,2,3)))))