This topic describes the ST_Intersection function. This function returns the intersection of a scene object and a meshgeom object.

Syntax

scene ST_Intersection(scene sc, meshgeom geom);

Parameters

Parameter Description
sc The scene object.
geom The meshgeom object.

Description

If you use a closed meshgeom object to clip a scene object, a part of the scene object remains inside the meshgeom object.

  • If the meshgeom object is not closed, NULL is returned.
  • If the meshgeom object is empty, NULL is returned.

Example

SELECT ST_AsText(ST_Intersection(ST_3DSphere(0.5,1), ST_3DMakeCuboid(1,1,1)));
--------
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......}]}}