![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Represents a light source with position, intensity, and falloff properties. More...
#include <Light.h>
Public Member Functions | |
Light () | |
Default constructor for the Light class. | |
Light (Vector3D p, Vector3D intensity, float falloff, float a, float b) | |
Constructs a Light object with specified properties. | |
void | Set (Vector3D p, Vector3D intensity, float falloff, float a, float b) |
Sets the light's properties. | |
void | SetIntensity (Vector3D intensity) |
Sets the intensity of the light. | |
void | SetFalloff (float falloff, float a, float b) |
Sets the falloff and attenuation parameters for the light. | |
void | MoveTo (Vector3D p) |
Moves the light to a specified position. | |
void | Translate (Vector3D p) |
Translates the light by a specified vector. | |
void | SetFalloff (float falloff) |
Sets the falloff rate of the light. | |
void | SetCurve (float a, float b) |
Sets the attenuation curve parameters for the light. | |
Vector3D | GetPosition () |
Retrieves the position of the light source. | |
float | GetFalloff () |
Retrieves the falloff rate of the light. | |
float | GetCurveA () |
Retrieves the first curve parameter for attenuation. | |
float | GetCurveB () |
Retrieves the second curve parameter for attenuation. | |
Vector3D | GetIntensity () |
Retrieves the intensity of the light. | |
Private Attributes | |
Vector3D | p |
Position of the light source. | |
Vector3D | intensity |
Intensity vector of the light. | |
float | falloff |
Falloff rate of the light. | |
float | a |
Attenuation curve parameter A. | |
float | b |
Attenuation curve parameter B. | |
Represents a light source with position, intensity, and falloff properties.
float GetCurveA | ( | ) |
float GetCurveB | ( | ) |
float GetFalloff | ( | ) |
Vector3D GetIntensity | ( | ) |
Vector3D GetPosition | ( | ) |
Moves the light to a specified position.
p | New position of the light source. |
Definition at line 29 of file Light.cpp.
References p.
Referenced by Boot::Update().
Sets the light's properties.
p | Position of the light source. |
intensity | Intensity of the light. |
falloff | Falloff rate of the light. |
a | Curve parameter for attenuation. |
b | Curve parameter for attenuation. |
Definition at line 11 of file Light.cpp.
References a, b, falloff, intensity, and p.
Referenced by Boot::Boot(), Crash::Crash(), and PhysicsSimulator::PhysicsSimulator().
|
private |
Attenuation curve parameter A.
Definition at line 122 of file Light.h.
Referenced by GetCurveA(), Set(), SetCurve(), and SetFalloff().
|
private |
Attenuation curve parameter B.
Definition at line 123 of file Light.h.
Referenced by GetCurveB(), Set(), SetCurve(), and SetFalloff().
|
private |
Falloff rate of the light.
Definition at line 121 of file Light.h.
Referenced by GetFalloff(), Set(), SetFalloff(), and SetFalloff().
|
private |
Intensity vector of the light.
Definition at line 120 of file Light.h.
Referenced by GetIntensity(), Set(), and SetIntensity().
|
private |
Position of the light source.
Definition at line 119 of file Light.h.
Referenced by GetPosition(), MoveTo(), Set(), and Translate().