GCubeSDK
©2026 FenixFox®Studios

PlaneGeometry

PlaneGeometry ⟵ BufferGeometry

A geometry class for a plane with given width and height.
PlaneGeometry creates a plane geometry that is centered on the origin, with customizable width and height. The plane is oriented in the X-Y plane and faces the positive Z direction by default.

Methods

PlaneGeometry(f32 width, f32 height, u32 widthSegments, u32 heightSegments, const Color& color)

Universal constructor - covers all cases with smart defaults

width Width along the X axis 1.0f
height Height along the Y axis 1.0f
widthSegments Number of segments along width 1
heightSegments Number of segments along height 1
color RGBA color for all vertices 0xFFFFFFFF (white)

PlaneGeometry* clone(bool recursive = false) const

Creates a copy of this geometry

recursive Whether to clone descendants as well

void copy(const PlaneGeometry& geometry)

Copies properties from another geometry

geometry Source geometry to copy from

void buildPlane()

Builds the plane geometry with vertices, indices, and colors

Properties

color Color RGBA color for all vertices
height f32 Height of the plane
heightSegments u32 Number of segments along height
width f32 Width of the plane
widthSegments u32 Number of segments along width