Distant Light. More...
#include <ilviews/bitmaps/filters/lights.h>
Public Member Functions | |
IlvDistantLight (IlFloat azimuth=0.0, IlFloat elevation=0.0, IlFloat r=1.0, IlFloat g=1.0, IlFloat b=1.0) | |
Constructor. More... | |
IlFloat | getAzimuth () const |
Returns the azimuth. More... | |
IlFloat | getElevation () const |
Returns the elevation. More... | |
void | getLightVector (IlFloat x, IlFloat y, IlFloat z, IlFloat *result) |
Returns the vector from this instance to a given point in 3D space. More... | |
void | setAzimuth (IlFloat azimuth) |
Sets the azimuth. More... | |
void | setElevation (IlFloat elevation) |
Sets the elevation. More... | |
void | update () |
Called when the instance needs internal updating. | |
Public Member Functions inherited from IlvLightSource | |
IlvLightSource (IlFloat r=1.0, IlFloat g=1.0, IlFloat b=1.0) | |
Constructor. More... | |
virtual | ~IlvLightSource () |
Destructor. More... | |
IlFloat | getB () const |
Returns the blue component value. More... | |
IlFloat | getG () const |
Returns the green component value. More... | |
IlFloat | getR () const |
Returns the red component value. More... | |
void | setB (IlFloat b) |
Sets the blue component value. More... | |
void | setG (IlFloat g) |
Sets the green component value. More... | |
void | setR (IlFloat r) |
Sets the red component value. More... | |
Public Member Functions inherited from IlvValueInterface | |
virtual IlBoolean | applyValue (const IlvValue &value) |
Apply an accessor. More... | |
virtual IlBoolean | changeValue (const IlvValue &val) |
Changes the value of an accessor. More... | |
virtual IlBoolean | changeValues (const IlvValue *values, IlUShort count=0) |
Changes several accessor values simultaneously. More... | |
virtual void | getAccessors (const IlSymbol *const **names, const IlvValueTypeClass *const **types, IlUInt &count) const |
Retrieves the list of available accessors of an object. More... | |
virtual const char * | getName () const |
Returns the name of the instance. The semantic and implementation of this method are defined by concrete subclasses. The default implementation returns 0 . More... | |
virtual IlvValue & | queryValue (IlvValue &val) const |
Retrieves an accessor value. More... | |
virtual void | queryValues (IlvValue *values, IlUShort count) const |
Retrieves multiple accessor values simultaneously. More... | |
Distant Light.
Library: ilvbmpflt
This class allows you to model an infinitely distant light using an elevation and an azimuth.
IlvDistantLight::IlvDistantLight | ( | IlFloat | azimuth = 0.0 , |
IlFloat | elevation = 0.0 , |
||
IlFloat | r = 1.0 , |
||
IlFloat | g = 1.0 , |
||
IlFloat | b = 1.0 |
||
) |
Constructor.
Initializes a new instance of the class IlvDistantLight
.
The default azimuth and elevation are 0.0
. The default light color is white.
IlFloat IlvDistantLight::getAzimuth | ( | ) | const |
Returns the azimuth.
IlFloat IlvDistantLight::getElevation | ( | ) | const |
Returns the elevation.
Returns the vector from this instance to a given point in 3D space.
x | The x position of the point. |
y | The y position of the point. |
z | The z position of the point. |
result | An array of 3 floating point values that will hold the vector. |
Reimplemented from IlvLightSource.
void IlvDistantLight::setAzimuth | ( | IlFloat | azimuth | ) |
Sets the azimuth.
azimuth | The new azimuth. |
void IlvDistantLight::setElevation | ( | IlFloat | elevation | ) |
Sets the elevation.
elevation | The new elevation. |