MCPcopy
hub / github.com/g3n/engine / NewSphere

Function NewSphere

geometry/sphere.go:15–17  ·  view source on GitHub ↗

NewSphere creates a sphere geometry with the specified radius and number of radial segments in each dimension.

(radius float64, widthSegments, heightSegments int)

Source from the content-addressed store, hash-verified

13
14// NewSphere creates a sphere geometry with the specified radius and number of radial segments in each dimension.
15func NewSphere(radius float64, widthSegments, heightSegments int) *Geometry {
16 return NewSphereSector(radius, widthSegments, heightSegments, 0, math.Pi*2, 0, math.Pi)
17}
18
19// NewSphereSector creates a sphere sector geometry with the specified radius, number of radial segments in each dimension, elevation
20// start angle in radians, elevation size angle in radians, sector start angle in radians, and sector size angle in radians.

Callers

nothing calls this directly

Calls 1

NewSphereSectorFunction · 0.85

Tested by

no test coverage detected