Checks whether a closed 3D volume contains a 3D geometry object or 3D model.
Syntax
bool ST_3DContains(meshgeom geom1, meshgeom geom2);
bool ST_3DContains(sfmesh sfmeshObject1, sfmesh sfmeshObject2);
bool ST_3DContains(box3d box3d, meshgeom geom);
bool ST_3DContains(box3d box3d, sfmesh sfmeshObject);Parameters
| Parameter | Description |
|---|---|
geom | The meshgeom object. |
sfmeshObject | The sfmesh object. |
box3d | The box3d object. |
Return value
Returns true if the first argument contains the second argument, false if it does not, and NULL if the function fails.
Usage notes
The first argument can be a
meshgeom,sfmesh, orbox3dobject. The second argument must be ameshgeomorsfmeshobject.When the first argument is an
sfmesh, it must be a closedsfmeshobject.
Examples
Check whether an indexed surface mesh contains a triangle strip mesh:
SELECT ST_3DContains(
'MESH(INDEXSURFACE Z(VERTEX(0 0 0,0 10 0,0 0 10,10 0 0), INDEX((0,1,2),(1,0,3),(3,0,2),(2,1,3))))'::meshgeom,
'MESH(TRIANGLESTRIP Z(0.1 0.1 0.1,0.1 1 0.1,0.1 0.1 1,0.1 1 1))'::meshgeom);The smaller triangle strip mesh falls entirely within the indexed surface mesh, so the result is t (true).