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
| Parameter | Type | Description |
|---|---|---|
radius | float | The radius of the sphere. |
subdiv | int | The 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
该文章对您有帮助吗?