ST_Difference

更新时间:
复制 MD 格式

Returns the portion of a scene object that lies outside a meshgeom object.

Syntax

scene ST_Difference(scene sc, meshgeom geom);

Parameters

ParameterTypeDescription
scsceneThe scene object to clip.
geommeshgeomThe 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:

  • geom is not closed.

  • geom is 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,......}]}}