Inheritance diagram for osg::Light:
Public Member Functions | |
Light () | |
Light (const Light &light, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_StateAttribute (osg, Light, LIGHT) | |
virtual int | compare (const StateAttribute &sa) const |
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. | |
virtual unsigned int | getMember () const |
Return the member identifier within the attribute's class type. | |
virtual bool | getModeUsage (ModeUsage &usage) const |
Return the modes associated with this StateAttribute. | |
void | setLightNum (int num) |
Set which OpenGL light to operate on. | |
int | getLightNum () const |
Get which OpenGL light this osg::Light operates on. | |
void | setAmbient (const Vec4 &ambient) |
Set the ambient component of the light. | |
const Vec4 & | getAmbient () const |
Get the ambient component of the light. | |
void | setDiffuse (const Vec4 &diffuse) |
Set the diffuse component of the light. | |
const Vec4 & | getDiffuse () const |
Get the diffuse component of the light. | |
void | setSpecular (const Vec4 &specular) |
Set the specular component of the light. | |
const Vec4 & | getSpecular () const |
Get the specular component of the light. | |
void | setPosition (const Vec4 &position) |
Set the position of the light. | |
const Vec4 & | getPosition () const |
Get the position of the light. | |
void | setDirection (const Vec3 &direction) |
Set the direction of the light. | |
const Vec3 & | getDirection () const |
Get the direction of the light. | |
void | setConstantAttenuation (float constant_attenuation) |
Set the constant attenuation of the light. | |
float | getConstantAttenuation () const |
Get the constant attenuation of the light. | |
void | setLinearAttenuation (float linear_attenuation) |
Set the linear attenuation of the light. | |
float | getLinearAttenuation () const |
Get the linear attenuation of the light. | |
void | setQuadraticAttenuation (float quadratic_attenuation) |
Set the quadratic attenuation of the light. | |
float | getQuadraticAttenuation () const |
Get the quadratic attenuation of the light. | |
void | setSpotExponent (float spot_exponent) |
Set the spot exponent of the light. | |
float | getSpotExponent () const |
Get the spot exponent of the light. | |
void | setSpotCutoff (float spot_cutoff) |
Set the spot cutoff of the light. | |
float | getSpotCutoff () const |
Get the spot cutoff of the light. | |
void | captureLightState () |
Capture the lighting settings of the current OpenGL state and store them in this object. | |
virtual void | apply (State &state) const |
Apply the light's state to the OpenGL state machine. | |
Protected Member Functions | |
virtual | ~Light () |
void | init () |
Initialize the light's settings with some decent defaults. | |
Protected Attributes | |
int | _lightnum |
Vec4 | _ambient |
Vec4 | _diffuse |
Vec4 | _specular |
Vec4 | _position |
Vec3 | _direction |
float | _constant_attenuation |
float | _linear_attenuation |
float | _quadratic_attenuation |
float | _spot_exponent |
float | _spot_cutoff |
|
|
|
Copy constructor using CopyOp to manage deep vs shallow copy.
|
|
|
|
Apply the light's state to the OpenGL state machine.
Implements osg::StateAttribute. |
|
Capture the lighting settings of the current OpenGL state and store them in this object.
|
|
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Implements osg::StateAttribute. |
|
Get the ambient component of the light.
|
|
Get the constant attenuation of the light.
|
|
Get the diffuse component of the light.
|
|
Get the direction of the light.
|
|
Get which OpenGL light this osg::Light operates on.
|
|
Get the linear attenuation of the light.
|
|
Return the member identifier within the attribute's class type. Used for light number/clip plane number etc. Reimplemented from osg::StateAttribute. |
|
Return the modes associated with this StateAttribute.
Reimplemented from osg::StateAttribute. |
|
Get the position of the light.
|
|
Get the quadratic attenuation of the light.
|
|
Get the specular component of the light.
|
|
Get the spot cutoff of the light.
|
|
Get the spot exponent of the light.
|
|
Initialize the light's settings with some decent defaults.
|
|
|
|
Set the ambient component of the light.
|
|
Set the constant attenuation of the light.
|
|
Set the diffuse component of the light.
|
|
Set the direction of the light.
|
|
Set which OpenGL light to operate on.
|
|
Set the linear attenuation of the light.
|
|
Set the position of the light.
|
|
Set the quadratic attenuation of the light.
|
|
Set the specular component of the light.
|
|
Set the spot cutoff of the light.
|
|
Set the spot exponent of the light.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|