GCubeSDK
©2026 FenixFox®Studios

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
color RGBA color for all vertices 0xFFFFFFFF

CircleGeometry* clone(bool recursive = false) const

Creates a copy of this geometry

recursive Whether to clone descendants as well

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

Properties

color Color RGBA color for all vertices
radius f32 Radius of the circle
segments u32 Number of triangular segments
thetaLength f32 Central angle in radians
thetaStart f32 Start angle in radians