Panda3D
|
SpotLight class. More...
Public Member Functions | |
__init__ () | |
Creates a new spot light. More... | |
const LVecBase3 | getDirection () |
float | getFov () |
float | getRadius () |
lookAt (LVecBase3 point) | |
lookAt (float x, float y, float z) | |
setDirection (LVecBase3 direction) | |
setDirection (float dx, float dy, float dz) | |
setFov (float fov) | |
setRadius (float radius) | |
![]() | |
clearIesProfile () | |
Clears the ies profile. More... | |
bool | getCastsShadows () |
Returns whether the light casts shadows. More... | |
const LVecBase3 | getColor () |
Returns the lights color. More... | |
float | getEnergy () |
Returns the energy of the light. More... | |
int | getIesProfile () |
Returns the lights ies profile. More... | |
RPLight::LightType | getLightType () |
Returns the type of the light. More... | |
float | getNearPlane () |
Returns the near plane of the light. More... | |
const LVecBase3 | getPos () |
Returns the position of the light. More... | |
int | getShadowMapResolution () |
Returns the shadow map resolution. More... | |
bool | hasIesProfile () |
Returns whether the light has an ies profile assigned. More... | |
invalidateShadows () | |
Invalidates the shadows. More... | |
setCastsShadows (bool flag) | |
Controls whether the light casts shadows. More... | |
setColor (const LVecBase3 color) | |
Sets the lights color. More... | |
setColor (float r, float g, float b) | |
Sets the lights color. More... | |
setColorFromTemperature (float temperature) | |
Sets the lights color from a given color temperature. More... | |
setEnergy (float energy) | |
Sets the energy of the light. More... | |
setIesProfile (int profile) | |
Sets the ies profile. More... | |
setNearPlane (float near_plane) | |
Sets the near plane of the light. More... | |
setPos (const LVecBase3 pos) | |
Sets the position of the light. More... | |
setPos (float x, float y, float z) | |
Sets the position of the light. More... | |
setShadowMapResolution (int resolution) | |
Sets the lights shadow map resolution. More... | |
![]() | |
int | getRefCount () |
Returns the current reference count. More... | |
ref () | |
Explicitly increments the reference count. More... | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
bool | unref () |
Explicitly decrements the reference count. More... | |
Public Attributes | |
const LVecBase3 | direction |
float | fov |
float | radius |
![]() | |
bool | casts_shadows |
Returns whether the light casts shadows. More... | |
const LVecBase3 | color |
Returns the lights color. More... | |
float | energy |
Returns the energy of the light. More... | |
int | ies_profile |
Returns the lights ies profile. More... | |
RPLight::LightType | light_type |
Returns the type of the light. More... | |
float | near_plane |
Returns the near plane of the light. More... | |
const LVecBase3 | pos |
Returns the position of the light. More... | |
int | shadow_map_resolution |
Returns the shadow map resolution. More... | |
![]() | |
int | ref_count |
The current reference count. More... | |
Additional Inherited Members | |
![]() | |
enum | LightType { LT_empty = 0, LT_point_light = 1, LT_spot_light = 2 } |
Different types of light. More... | |
![]() | |
static TypeHandle | getClassType () |
SpotLight class.
This represents a spot light, a light which has a position, radius, direction and FoV. Checkout the RenderPipeline documentation for more information about this type of light.
__init__ | ( | ) |
Creates a new spot light.
This creates a new spot light with default properties set. You should set at least a direction, fov, radius and position to make the light useful.
const LVecBase3 getDirection | ( | ) |
float getFov | ( | ) |
float getRadius | ( | ) |
lookAt | ( | LVecBase3 | point | ) |
lookAt | ( | float | x, |
float | y, | ||
float | z | ||
) |
setDirection | ( | LVecBase3 | direction | ) |
setDirection | ( | float | dx, |
float | dy, | ||
float | dz | ||
) |
setFov | ( | float | fov | ) |
setRadius | ( | float | radius | ) |
const LVecBase3 direction |
float fov |
float radius |