CircleGeometry
CircleGeometry ⟵ BufferGeometry
A geometry class for a circle with given radius and segments.
CircleGeometry creates a circle geometry that is centered on the origin, lying in the XZ plane (Y = 0). The circle is constructed from triangular segments and can be used to create regular polygons or partial circles.
Methods
CircleGeometry(f32 radius, u32 segments, f32 thetaStart, f32 thetaLength, Color color)
Universal constructor - covers all cases with smart defaults
| radius | Radius of the circle | 1.0f |
| segments | Number of triangular segments (minimum 3) | 32 |
| thetaStart | Start angle for first segment in radians | 0.0f |
| thetaLength | Central angle of circular sector in radians | 2π |
| color | RGBA color for all vertices | 0xFFFFFFFF |
CircleGeometry* clone(bool recursive) const
Creates a copy of this geometry
| recursive | Whether to clone descendants as well | false |
void copy(const CircleGeometry& geometry)
Copies properties from another geometry
| geometry | Source geometry to copy from |
void buildCircle()
Builds the circle geometry with vertices, indices, and colors
void dispose()
Frees GPU-related resources
Properties
| radius | f32 | Radius of the circle |
| segments | u32 | Number of triangular segments |
| thetaStart | f32 | Start angle in radians |
| thetaLength | f32 | Central angle in radians |
| color | Color | RGBA color for all vertices |