Name

CG_Rotate3D — Rotates a geometry in 3D space around an axis vector.

Synopsis

geometry CG_Rotate3D(geometry geom, float8 angle, float8 ax, float8 ay, float8 az);

Descrizione

Rotates the input geometry geom by angle radians around an axis defined by the vector (ax, ay, az) passing through the origin (0,0,0).

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

Questo metodo richiede il backend SFCGAL.

Questa funzione supporta il 3d e non distrugge gli z-index.

Esempi

SELECT ST_AsText(CG_Rotate3D('POINT(1 0 0)', pi()/2, 0, 0, 1));
-- Result: POINT(0 1 0)

Si veda anche

CG_RotateX, CG_RotateY, CG_RotateZ