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.

InheritanceDiagram node_BufferGeometry BufferGeometry node_PolyhedronGeometry PolyhedronGeometry node_BufferGeometry->node_PolyhedronGeometry node_IcosahedronGeometry IcosahedronGeometry node_PolyhedronGeometry->node_IcosahedronGeometry

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) const

Creates a copy of this geometry

recursive Whether to clone descendants as well false

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

void dispose()

Frees GPU-related resources

Properties

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