Panda3D
|
PointLight class. More...
Public Member Functions | |
__init__ () | |
Constructs a new point light. More... | |
float | getInnerRadius () |
Returns the inner radius of the light. More... | |
float | getRadius () |
Returns the lights radius. More... | |
setInnerRadius (float inner_radius) | |
Sets the inner radius of the light. More... | |
setRadius (float radius) | |
Sets the radius of the light. More... | |
![]() | |
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 | |
float | inner_radius |
Returns the inner radius of the light. More... | |
float | radius |
Returns the lights radius. More... | |
![]() | |
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 () |
PointLight class.
This represents a point light, a light which has a position and radius. Checkout the RenderPipeline documentation for more information about this type of light.
__init__ | ( | ) |
Constructs a new point light.
This contructs a new point light with default settings. By default the light is set to be an infinitely small point light source. You can change this with RPPointLight::set_inner_radius.
float getInnerRadius | ( | ) |
Returns the inner radius of the light.
This returns the inner radius of the light, previously set with RPPointLight::get_inner_radius.
float getRadius | ( | ) |
Returns the lights radius.
This returns the lights radius previously set with RPPointLight::set_radius
setInnerRadius | ( | float | inner_radius | ) |
Sets the inner radius of the light.
This sets the inner radius of the light. Anything greater than zero causes the light to get an area light. This has influence on the specular highlights of the light aswell as the shadows.
The inner radius controls the size of the lights sphere size in world space units. A radius of 0 means the light has no inner radius, and the light will be have like an infinite small point light source. A radius greater than zero will cause the light to behave like it would be an emissive sphere with the given inner radius emitting light. This is more physically correct.
inner_radius | Inner-radius in world space |
setRadius | ( | float | radius | ) |
Sets the radius of the light.
This sets the radius of the light. It controls the lights influence. After a distance greater than this radius, the light influence is zero.
radius | Light radius in world space |
float inner_radius |
Returns the inner radius of the light.
This returns the inner radius of the light, previously set with RPPointLight::get_inner_radius.
float radius |
Returns the lights radius.
This returns the lights radius previously set with RPPointLight::set_radius