GCubeSDK
©2026 FenixFox®Studios

AxesHelper

AxesHelper ⟵ LineObject3D

A helper class for visualizing the 3 axes (X, Y, Z) using Line geometry.
AxesHelper creates a visual representation of the three primary axes in 3D space using line segments, useful for debugging, orientation reference, and spatial understanding. The X axis is red, Y axis is green, and Z axis is blue. The Geometry is hovering above ground 0.001f to make it better visible when paired with a GridHelper.

  • Inherits from Line class
  • Visualizes X, Y, and Z axes with distinct colors
  • Configurable size for the axes
  • Customizable colors for each axis
  • Automatic geometry generation

Methods

AxesHelper(f32 size)

Constructor with size

size Size of the axes lines 1.0f

virtual Object3D* clone(bool recursive = true) const override

Creates a copy of this object

recursive Whether to clone children true

virtual void copy(const Object3D& object, bool recursive = true) override

Copies properties from another object

object Source
recursive Copy children too

void setSize(f32 size)

Sets the size of the axes

size New size for the axes

f32 getSize() const

Gets the current size of the axes

void setColors(Color xAxisColor, Color yAxisColor, Color zAxisColor)

Sets the colors for each axis

xAxisColor Color for X axis (RGBA) 0xFF0000FF red
yAxisColor Color for Y axis (RGBA) 0x00FF00FF green
zAxisColor Color for Z axis (RGBA) 0x0000FFFF blue

void getColors(Color& xAxisColor, Color& yAxisColor, Color& zAxisColor) const

Gets the current colors for each axis

xAxisColor Current X axis color (RGBA)
yAxisColor Current Y axis color (RGBA)
zAxisColor Current Z axis color (RGBA)

void update()

Updates the axes geometry with current parameters

Properties

isAxesHelper bool Read-only tag
size f32 Size of the axes
xAxisColor Color Color of X axis (RGBA)
yAxisColor Color Color of Y axis (RGBA)
zAxisColor Color Color of Z axis (RGBA)