The abstract interface to all kinds of lights. More...
Public Member Functions | |
PandaNode | asNode () |
int | getClassPriority () |
VBase4 const | getColor () |
Returns the basic color of the light. | |
int | getPriority () |
Returns the priority associated with this light. | |
bool | isAmbientLight () |
Returns true if this is an AmbientLight, false if it is some other kind of light. | |
setColor (VBase4 const color) | |
Sets the basic color of the light. | |
setPriority (int priority) | |
Changes the relative importance of this light relative to the other lights that are applied simultaneously. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
The abstract interface to all kinds of lights.
The actual light objects also inherit from PandaNode, and can therefore be added to the scene graph at some arbitrary point to define the coordinate system of effect.
int getClassPriority | ( | ) |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from ReferenceCount.
Reimplemented in Spotlight, PointLight, DirectionalLight, LightLensNode, AmbientLight, and LightNode.
int getPriority | ( | ) |
Returns the priority associated with this light.
See set_priority().
bool isAmbientLight | ( | ) |
Returns true if this is an AmbientLight, false if it is some other kind of light.
setPriority | ( | int | priority | ) |
Changes the relative importance of this light relative to the other lights that are applied simultaneously.
The priority number is used to decide which of the requested lights are to be selected for rendering when more lights are requested than the hardware will support. The highest-priority n lights are selected for rendering.
This is similar to TextureStage::set_priority().