PointLight
A light that gets emitted from a single point in all
directions.
PointLight simulates light from a local source, such as a lightbulb or
candle. Light rays radiate outward from a
specific 3D position, creating realistic lighting with distance-based
attenuation.
Methods
PointLight(const Color& color, f32 lightIntensity, f32 lightDistance, f32 lightDecay)
Universal constructor - covers all cases with smart defaults
| color | RGBA color value | 0xFFFFFFFF |
| lightIntensity | Light intensity value (0.0 - 1.0) | 1.0f |
| lightDistance | Maximum range of the light (0 = no limit) | 0.0f |
| lightDecay | The amount the light dims along distance | 2.0f |
virtual void apply() override
Applies this point light's settings to the GX pipeline
virtual void update() override
Updates the point light (called each frame)
virtual void copy(const Object3D& object, bool recursive) override
Copies properties from another Object3D
| object | Source object to copy from | |
| recursive | Whether to copy all child objects as well | true |
virtual PointLight* clone() const override
Creates a copy of this light
virtual Object3D* clone(bool recursive) const override
Creates a copy of this object
| recursive | Whether to clone all child objects as well | true |
void setDistance(f32 newDistance)
Sets the light distance and triggers attenuation recalculation
| newDistance | New distance value |
void setDecay(f32 newDecay)
Sets the light decay and triggers attenuation recalculation
| newDecay | New decay value |
Properties
| attenuationK0 | f32 | Constant attenuation |
| attenuationK1 | f32 | Linear attenuation |
| attenuationK2 | f32 | Quadratic attenuation |
| decay | f32 | Light decay factor (default 2.0) |
| distance | f32 | Maximum range of the light (0 = no limit) |
| gxLightObj | GXLightObj | GX light object for this point light |