32 #include "gpuCommand.h" 33 #include "shadowSource.h" 56 virtual void init_shadow_sources() = 0;
57 virtual void update_shadow_sources() = 0;
75 inline void set_pos(
const LVecBase3 &pos);
76 inline void set_pos(
float x,
float y,
float z);
77 inline const LVecBase3& get_pos()
const;
80 inline void set_color(
const LVecBase3 &color);
81 inline void set_color(
float r,
float g,
float b);
82 inline const LVecBase3&
get_color()
const;
92 MAKE_PROPERTY(light_type, get_light_type);
106 MAKE_PROPERTY2(ies_profile, has_ies_profile, get_ies_profile,
116 size_t _source_resolution;
125 std::vector<ShadowSource*> _shadow_sources;
get_ies_profile
Returns the lights ies profile.
set_energy
Sets the energy of the light.
get_light_type
Returns the type of the light.
set_pos
Sets the position of the light.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
RPLight(LightType light_type)
RenderPipeline.
get_shadow_map_resolution
Returns the shadow map resolution.
void invalidate_shadows()
Invalidates the shadows.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_needs_update(bool flag)
Sets whether the light needs an update.
set_casts_shadows
Controls whether the light casts shadows.
set_ies_profile
Sets the ies profile.
size_t get_num_shadow_sources() const
RenderPipeline.
get_casts_shadows
Returns whether the light casts shadows.
ShadowSource * get_shadow_source(size_t index) const
Returns the n-th shadow source.
virtual ~RPLight()
Light destructor.
void set_color_from_temperature(float temperature)
Sets the lights color from a given color temperature.
bool get_needs_update() const
Returns whether the light needs an update.
set_near_plane
Sets the near plane of the light.
set_color
Sets the lights color.
set_shadow_map_resolution
Sets the lights shadow map resolution.
get_energy
Returns the energy of the light.
void clear_shadow_sources()
Clears all shadow source.
get_color
Returns the lights color.
bool has_slot() const
Returns whether the light has a slot.
virtual void write_to_command(GPUCommand &cmd)
Writes the light to a GPUCommand.
A base class for all things that want to be reference-counted.
LightType
Different types of light.
Class for storing data to be transferred to the GPU.
void remove_slot()
Removes the light slot.
void assign_slot(int slot)
Assigns a slot to the light.
int get_slot() const
Returns the slot of the light.
has_ies_profile
Returns whether the light has an ies profile assigned.
clear_ies_profile
Clears the ies profile.
get_near_plane
Returns the near plane of the light.