#include <VLight.h>
Inherits TLMDataIF.
Collaboration diagram for VLight:

Public Member Functions | |
| VLight (GLenum lightNum) | |
| virtual | ~VLight () |
| bool | initFromXML (const wxXmlNode &lightNode) |
| virtual void | getAvailableData (map< TLMDataIF::Key, TLMDataIF::DataInfo > &data) const |
| virtual bool | getDataValue (const TLMDataIF::Key &key, string &data) const |
| virtual bool | setDataValue (const TLMDataIF::Key &key, const string &data) |
| void | setPosition (const double x, const double y, const double z) |
| void | getPosition (double &x, double &y, double &z) const |
| void | setDirection (const double x, const double y, const double z) |
| void | getDirection (double &x, double &y, double &z) const |
| void | setColor (GLenum mode, const double red, const double green, const double blue, const double alpha) |
| void | getColor (GLenum mode, double &red, double &green, double &blue, double &alpha) const |
| void | setSpotDirection (const double x, const double y, const double z) |
| void | getSpotDirection (double &x, double &y, double &z) const |
| void | setSpotExponent (const double exp) |
| void | getSpotExponent (double &exp) const |
| void | setSpotCutoff (const double cutoff) |
| void | getSpotCutoff (double &cutoff) const |
| void | setConstantAttenuation (const double att) |
| void | getConstantAttenuation (double &att) const |
| void | setLinearAttenuation (const double att) |
| void | getLinearAttenuation (double &att) const |
| void | setQuadraticAttenuation (const double att) |
| void | getQuadraticAttenuation (double &att) const |
| void | draw () const |
| string | name () const |
| GLenum | lightNum () const |
Protected Member Functions | |
| void | cleanup () |
| void | drawBox (double x, double y, double z, double width, double depth, double height) const |
Protected Attributes | |
| GLenum | myLightNum |
| The light number GL_LIGHT0 - GL_LIGHT7. | |
| GLuint | myCallList |
| GLfloat | myPosition [4] |
Definition at line 20 of file VLight.h.
|
|
Construct a new light.
Definition at line 8 of file VLight.cpp. References memTraceMsg, myLightNum, and myPosition. |
|
|
Definition at line 15 of file VLight.cpp. References cleanup(), and memTraceMsg. Here is the call graph for this function: ![]() |
|
|
Definition at line 547 of file VLight.cpp. References myCallList, myLightNum, and traceId. Referenced by ~VLight(). |
|
|
Draw the light. This draws a non-textured, light-colored 1/2 width box at the location of the light Definition at line 519 of file VLight.cpp. References drawBox(), myCallList, myLightNum, myPosition, and traceId. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||
|
Definition at line 555 of file VLight.cpp. References traceId. Referenced by draw(). |
|
|
Get all the available data/telemetry elements that this class can provide. Each of the returned keys can be passed to the get/set functions to get/set that member data. Definition at line 98 of file VLight.cpp. References TLMDataIF::DOUBLE, TLMDataIF::getAvailableData(), and traceId. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
Definition at line 418 of file VLight.cpp. References myLightNum, and traceId. Referenced by getDataValue(), and setDataValue(). |
|
|
Definition at line 481 of file VLight.cpp. References myLightNum, and traceId. Referenced by getDataValue(). |
|
||||||||||||
|
Get the value of a particular data/telemetry element.
Reimplemented from TLMDataIF. Definition at line 149 of file VLight.cpp. References getColor(), getConstantAttenuation(), TLMDataIF::getDataValue(), getDirection(), getLinearAttenuation(), getPosition(), getQuadraticAttenuation(), and traceId. Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 395 of file VLight.cpp. References myCallList, myPosition, and traceId. Referenced by getDataValue(), and setDataValue(). |
|
|
Definition at line 496 of file VLight.cpp. References myLightNum, and traceId. Referenced by getDataValue(). |
|
||||||||||||||||
|
Definition at line 375 of file VLight.cpp. References myPosition, and traceId. Referenced by getDataValue(), and setDataValue(). |
|
|
Definition at line 511 of file VLight.cpp. References myLightNum, and traceId. Referenced by getDataValue(). |
|
|
Definition at line 466 of file VLight.cpp. References myLightNum, and traceId. |
|
||||||||||||||||
|
Definition at line 436 of file VLight.cpp. References myLightNum, and traceId. |
|
|
Definition at line 451 of file VLight.cpp. References myLightNum, and traceId. |
|
|
Initialize the light from an XML node. This creates the light. Definition at line 21 of file VLight.cpp. References XMLUtil::findChildWithName(), XMLUtil::findPropertyWithName(), setColor(), setDirection(), setPosition(), traceId, and warnMsg. Here is the call graph for this function: ![]() |
|
|
Definition at line 162 of file VLight.h. References myLightNum. Referenced by name(). |
|
|
Get a text name for this light. Definition at line 604 of file VLight.cpp. References lightNum(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
set the color of the light.
Definition at line 410 of file VLight.cpp. References myLightNum, and traceId. Referenced by initFromXML(), and setDataValue(). |
|
|
set the constant attenuation. All components of a light are attenuated. Setting this can slow down the lighting model This is only available for a positional light (see setPosition) Defaults are constant=1, linear=0, quadratic=0 Definition at line 474 of file VLight.cpp. References myCallList, myLightNum, and traceId. Referenced by setDataValue(). |
|
||||||||||||
|
Set the value of a particular data/telemetry element.
Reimplemented from TLMDataIF. Definition at line 258 of file VLight.cpp. References getColor(), getDirection(), getPosition(), setColor(), setConstantAttenuation(), TLMDataIF::setDataValue(), setDirection(), setLinearAttenuation(), setPosition(), setQuadraticAttenuation(), and traceId. Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Set the direction of the light. This is mutually exclusive with the setPosition function. A directional light is considered to be coming from a point infinitly far away in the given direction Definition at line 388 of file VLight.cpp. References myCallList, myPosition, and traceId. Referenced by initFromXML(), and setDataValue(). |
|
|
set the linear attenuation. All components of a light are attenuated. Setting this can slow down the lighting model This is only available for a positional light (see setPosition) Defaults are constant=1, linear=0, quadratic=0 Definition at line 489 of file VLight.cpp. References myCallList, myLightNum, and traceId. Referenced by setDataValue(). |
|
||||||||||||||||
|
Set the position of the light. This is mutually exclusive with the setDirection function. A light can have a position in the world. This sets that position. This only matters for the specular and diffuse components of the light. Definition at line 368 of file VLight.cpp. References myCallList, myPosition, and traceId. Referenced by initFromXML(), and setDataValue(). |
|
|
set the quadratic attenuation. All components of a light are attenuated. Setting this can slow down the lighting model This is only available for a positional light (see setPosition) Defaults are constant=1, linear=0, quadratic=0 Definition at line 504 of file VLight.cpp. References myCallList, myLightNum, and traceId. Referenced by setDataValue(). |
|
|
set the cuttoff attribute for a spotlight This is only available for a positional light (see setPosition) Default is cutoff=180 Definition at line 459 of file VLight.cpp. References myCallList, myLightNum, and traceId. |
|
||||||||||||||||
|
set the direction attributes for a spotlight This is only available for a positional light (see setPosition) Defaults are direction=(0,0,-1) Definition at line 428 of file VLight.cpp. References myCallList, myLightNum, and traceId. |
|
|
set the exponent attribute for a spotlight This is only available for a positional light (see setPosition) Default is exponent=0 Definition at line 444 of file VLight.cpp. References myCallList, myLightNum, and traceId. |
|
|
A call list used to speed up drawing Definition at line 169 of file VLight.h. Referenced by cleanup(), draw(), getDirection(), setConstantAttenuation(), setDirection(), setLinearAttenuation(), setPosition(), setQuadraticAttenuation(), setSpotCutoff(), setSpotDirection(), and setSpotExponent(). |
|
|
The light number GL_LIGHT0 - GL_LIGHT7.
Definition at line 168 of file VLight.h. Referenced by cleanup(), draw(), getColor(), getConstantAttenuation(), getLinearAttenuation(), getQuadraticAttenuation(), getSpotCutoff(), getSpotDirection(), getSpotExponent(), lightNum(), setColor(), setConstantAttenuation(), setLinearAttenuation(), setQuadraticAttenuation(), setSpotCutoff(), setSpotDirection(), setSpotExponent(), and VLight(). |
|
|
The position of this light. The position has to be stored because of how we light the scene as the camera moves. The light position is set every frame after the camera matrix has been set. This way the light doesn't move with the camera. However, this moves the light so we have to keep the original position around Definition at line 176 of file VLight.h. Referenced by draw(), getDirection(), getPosition(), setDirection(), setPosition(), and VLight(). |
1.4.5