GCubeSDK
©2026 FenixFox®Studios

IcosahedronGeometry

IcosahedronGeometry ⟵ PolyhedronGeometryBufferGeometry

A geometry class for an icosahedron with given radius and detail.
IcosahedronGeometry creates an icosahedron geometry that is centered on the origin. An icosahedron is a polyhedron with 20 triangular faces, 12 vertices, and 30 edges. It is one of the five Platonic solids and provides excellent base geometry for sphere approximation through subdivision.

Methods

IcosahedronGeometry(f32 radius, u32 detail, const Color& color)

Universal constructor - covers all cases with smart defaults

radius Radius of the icosahedron 1.0f
detail Number of subdivision levels (0 = original shape) 0
color RGBA color for all vertices 0xFFFFFFFF

IcosahedronGeometry* clone(bool recursive = false) const

Creates a copy of this geometry

recursive Whether to clone descendants as well

void copy(const IcosahedronGeometry& geometry)

Copies properties from another geometry

geometry Source geometry to copy from

void buildIcosahedron()

Builds the icosahedron geometry with vertices, indices, and colors

static vector<f32> getIcosahedronVertices()

Returns the vertex data for an icosahedron

static vector<u32> getIcosahedronIndices()

Returns the face indices for an icosahedron

Properties

color Color RGBA color for all vertices
detail u32 Number of subdivision levels
radius f32 Radius of the icosahedron