28 #include "rpSpotLight.h" 30 #ifndef _USE_MATH_DEFINES 31 #define _USE_MATH_DEFINES 44 _direction.set(0, 0, -1);
69 nassertv(_shadow_sources.size() == 0);
80 _shadow_sources[0]->set_perspective_lens(_fov, _near_plane, _radius, _position, _direction);
RPSpotLight()
Creates a new spot light.
get_shadow_map_resolution
Returns the shadow map resolution.
void push_float(float v)
Appends a float to the GPUCommand.
virtual void write_to_command(GPUCommand &cmd)
Writes the light to a GPUCommand.
virtual void write_to_command(GPUCommand &cmd)
Writes the light to a GPUCommand.
void push_vec3(const LVecBase3 &v)
Appends a 3-component floating point vector to the GPUCommand.
Class for storing data to be transferred to the GPU.
virtual void update_shadow_sources()
Updates the shadow sources.
virtual void init_shadow_sources()
Inits the shadow sources of the light.