Converts an sfmesh model from a Y-up coordinate system to a Z-up coordinate system by flipping the Y and Z axes.
Syntax
sfmesh ST_YupToZup(sfmesh mesh);Return value
The sfmesh object after the Y and Z axes are flipped.
Parameters
| Parameter | Description |
|---|---|
sfmesh | The sfmesh object to convert. |
Description
ST_YupToZup flips the Y and Z axes of an sfmesh object. This is equivalent to calling ST_Affine with the following transformation matrix:
1.0, 0, 0, 0,
0, 0, 1.0, 0,
0, -1.0, 0, 0Examples
SELECT ST_AsText(ST_YupToZup(ST_MeshFromText('{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}')));Result:
{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0,"matrix" : [1,0,0,-1,0,0,0,0,1,0,0,0,0,0,0,1]}]}