Panda3D
Public Member Functions | Public Attributes | List of all members
RPSpotLight Class Reference

SpotLight class. More...

Inheritance diagram for RPSpotLight:
RPLight ReferenceCount

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)
 
- Public Member Functions inherited from RPLight
 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...
 
- Public Member Functions inherited from ReferenceCount
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
 
- Public Attributes inherited from RPLight
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...
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 

Additional Inherited Members

- Public Types inherited from RPLight
enum  LightType { LT_empty = 0, LT_point_light = 1, LT_spot_light = 2 }
 Different types of light. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Detailed Description

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.

Member Function Documentation

◆ __init__()

__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.

◆ getDirection()

const LVecBase3 getDirection ( )

◆ getFov()

float getFov ( )

◆ getRadius()

float getRadius ( )

◆ lookAt() [1/2]

lookAt ( LVecBase3  point)

◆ lookAt() [2/2]

lookAt ( float  x,
float  y,
float  z 
)

◆ setDirection() [1/2]

setDirection ( LVecBase3  direction)

◆ setDirection() [2/2]

setDirection ( float  dx,
float  dy,
float  dz 
)

◆ setFov()

setFov ( float  fov)

◆ setRadius()

setRadius ( float  radius)

Member Data Documentation

◆ direction

const LVecBase3 direction

◆ fov

float fov

◆ radius

float radius