GCubeSDK
©2026 FenixFox®Studios

Light

Light ⟵ Object3D

Abstract base class for lights. All other light types inherit from this.
This class provides the foundation for all light types in the engine. It defines properties that control how lights illuminate objects, including color, intensity, and basic light behavior. Lights are designed to work with the GameCube's GX system.

  • Color and intensity control
  • GameCube GX integration
  • Object3D inheritance for scene integration

Methods

Light()

Default constructor - creates a white light with full intensity

Light(const Color& color)

Constructor with hex color

color Color value (e.g., Color(0xffffff) for white)

Light(const Color& color, f32 lightIntensity)

Constructor with hex color and intensity

color Color value (e.g., Color(0xffffff) for white)
lightIntensity Light intensity value (0.0 - 1.0)

virtual void apply()

Applies this light's settings to the GX pipeline

virtual void update()

Updates light state (called each frame)

virtual Light* clone() const

Creates a copy of this light

virtual void copy(const Light& source)

Copies properties from another light

source Source light to copy from

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

Copies properties from another Object3D

object Source object to copy from
recursive Whether to copy all child objects as well

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

Creates a copy of this object

recursive Whether to clone all child objects as well

Properties

color Color Color of the light (RGBA)
enabled bool Whether the light is active
id u32 Unique identifier
intensity f32 Light intensity (0.0 - 1.0)
isLight bool Read-only flag to check if object is Light
lightSlot u8 Which GX light slot this light uses
name string Optional name for the light
needsUpdate bool Whether light needs recompilation
uuid string UUID string
version u32 Version counter for updates