Returns the portion of a scene object that lies outside a meshgeom object.
Syntax
scene ST_Difference(scene sc, meshgeom geom);Parameters
| Parameter | Type | Description |
|---|---|---|
sc | scene | The scene object to clip. |
geom | meshgeom | The mesh geometry used as the clipping boundary. |
Description
ST_Difference(sc, geom) clips sc using a closed meshgeom object and returns the part of sc that falls outside geom.
The function returns NULL in the following cases:
geomis not closed.geomis empty.
Example
SELECT ST_AsText(ST_Difference(ST_3DSphere(0.5,1), ST_Translate(ST_3DMakeCuboid(1,1,1), 0.5, 0, 0)));Output:
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......}]}}该文章对您有帮助吗?