Panda3D
|
The abstract interface to all kinds of lights. More...
#include <pandadoc.hpp>
Public Member Functions | |
PandaNode | asNode () |
const LVecBase3 | getAttenuation () |
Returns the terms of the attenuation equation for the light. More... | |
int | getClassPriority () |
const LColor | getColor () |
Returns the basic color of the light. More... | |
float | getColorTemperature () |
Returns the basic color temperature of the light, assuming has_color_temperature() returns true. More... | |
float | getExponent () |
For spotlights, returns the exponent that controls the amount of light falloff from the center of the spotlight. More... | |
int | getPriority () |
Returns the priority associated with this light. More... | |
const LColor | getSpecularColor () |
Returns the color of specular highlights generated by the light. More... | |
bool | hasColorTemperature () |
Returns true if the color was specified as a temperature in kelvins, and get_color_temperature is defined. More... | |
bool | isAmbientLight () |
Returns true if this is an AmbientLight, false if it is some other kind of light. More... | |
setColor (const LColor color) | |
Sets the basic color of the light. More... | |
setColorTemperature (float temperature) | |
Sets the color temperature of the light in kelvins. More... | |
setPriority (int priority) | |
Changes the relative importance of this light relative to the other lights that are applied simultaneously. More... | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
Public Attributes | |
const LColor | color |
Returns the basic color of the light. More... | |
float | color_temperature |
Returns the basic color temperature of the light, assuming has_color_temperature() returns true. More... | |
int | priority |
Returns the priority associated with this light. More... | |
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.
PandaNode asNode | ( | ) |
const LVecBase3 getAttenuation | ( | ) |
Returns the terms of the attenuation equation for the light.
These are, in order, the constant, linear, and quadratic terms based on the distance from the point to the vertex.
int getClassPriority | ( | ) |
|
static |
const LColor getColor | ( | ) |
Returns the basic color of the light.
float getColorTemperature | ( | ) |
Returns the basic color temperature of the light, assuming has_color_temperature() returns true.
float getExponent | ( | ) |
For spotlights, returns the exponent that controls the amount of light falloff from the center of the spotlight.
For other kinds of lights, returns 0.
int getPriority | ( | ) |
Returns the priority associated with this light.
See set_priority().
const LColor getSpecularColor | ( | ) |
Returns the color of specular highlights generated by the light.
This value is meaningless for ambient lights.
bool hasColorTemperature | ( | ) |
Returns true if the color was specified as a temperature in kelvins, and get_color_temperature is defined.
bool isAmbientLight | ( | ) |
Returns true if this is an AmbientLight, false if it is some other kind of light.
setColor | ( | const LColor | color | ) |
Sets the basic color of the light.
setColorTemperature | ( | float | temperature | ) |
Sets the color temperature of the light in kelvins.
This will recalculate the light's color.
The default value is 6500 K, corresponding to a perfectly white light assuming a D65 white point.
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().
const LColor color |
Returns the basic color of the light.
float color_temperature |
Returns the basic color temperature of the light, assuming has_color_temperature() returns true.
int priority |
Returns the priority associated with this light.
See set_priority().