Returns the part of a scene object that lies outside a meshgeom object.
Syntax
scene ST_Difference(scene sc, meshgeom geom);Parameters
| Parameter | Description |
|---|---|
sc | The scene object. |
geom | The meshgeom object. |
Returns
Returns a scene object representing the part of sc that does not intersect geom.
Returns NULL in the following cases:
geomis not a closed meshgeom object.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,......}]}}The output is a glTF-formatted JSON object containing the geometry of the resulting scene.
该文章对您有帮助吗?