Light
Abstract base class for all light types.
This class is not intended to be used directly. Use one of the concrete light types such as AmbientLight, DirectionalLight, PointLight, or SpotLight.
INFO
Derives from Node and inherits all public properties and methods.
Construction
Constructors
Light()
Constructs a new light.
cpp
Light::Light(Color color, float intensity);| Parameter | Description |
|---|---|
| color | Light color. |
| intensity | Light intensity multiplier. |
Types
Light::Type enum
Enumerates all supported light types.
| Value | Description |
|---|---|
| Ambient | Non-directional constant light. |
| Directional | Infinitely distant light with parallel rays. |
| Point | Omnidirectional light emitting from a single point. |
| Spot | Light emitting in a cone from a single point. |
Properties
Light color represented as RGB components.
cpp
Color color {0xffffff};Functions
GetNodeType() Node::Type virtual
Identifies this node as Node::Type::Light.
cpp
Type vglx::Light::GetNodeType() const override;GetType() Light::Type pure virtual
Returns the specific Type of this light.
cpp
virtual Type vglx::Light::GetType() const=0;SetDebugMode() void virtual
Enables or disables debug visualization mode.
This mode can be used by renderers to draw light representations such as frustums, spheres, or cones for debugging purposes.
cpp
virtual void Light::SetDebugMode(bool is_debug_mode);| Parameter | Description |
|---|---|
| is_debug_mode | true to enable debug mode; false to disable. |