ST_3DSphere

更新时间:
复制 MD 格式

Constructs a 3D sphere model and returns it as a scene object in GL Transmission Format (glTF).

Syntax

scene ST_3DSphere(float radius, int subdiv);

Parameters

ParameterTypeDescription
radiusfloatThe radius of the sphere.
subdivintThe subdivision magnification. A larger value produces a more refined subdivision. Valid values: 1–10.

Examples

The following example constructs a sphere with a radius of 1 and a subdivision magnification of 1, then converts the result to text:

SELECT ST_AsText(ST_3DSphere(1, 1));

Output:

{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......}]}}

See also

  • ST_AsText — converts a scene object to its text representation