LightLensNode¶
-
class
LightLensNode
¶ -
A derivative of Light and of Camera. The name might be misleading: it does not directly derive from
LensNode
, but through the Camera class. The Camera serves no purpose unless shadows are enabled.Inheritance diagram
-
static TypeHandle
get_class_type
(void)¶
-
GraphicsOutputBase *
get_shadow_buffer
(GraphicsStateGuardianBase *gsg)¶ Returns the buffer that has been constructed for a given GSG, or NULL if no such buffer has (yet) been constructed. This should be used for debugging only, you will not need to call this normally.
-
LVecBase2i
get_shadow_buffer_size
(void) const¶ Returns the size of the shadow buffer to be created for this light source.
-
int
get_shadow_buffer_sort
(void) const¶ Returns the sort of the shadow buffer to be created for this light source.
-
bool
has_specular_color
(void) const¶ Returns true if this light defines a specular color, false if the specular color is derived automatically from the light color.
-
bool
is_shadow_caster
(void) const¶ Returns whether this light is configured to cast shadows or not.
-
virtual void
output
(std::ostream &out) const¶ We have to explicitly publish these because they resolve the multiple inheritance.
-
void
set_shadow_buffer_size
(LVecBase2i const &size)¶ Sets the size of the shadow buffer to be created for this light source.
-
void
set_shadow_caster
(bool caster)¶
-
void
set_shadow_caster
(bool caster, int buffer_xsize, int buffer_ysize, int sort = -10)¶ Sets the flag indicating whether this light should cast shadows or not. This is the variant without buffer size, meaning that the current buffer size will be kept (512x512 is the default). Note that enabling shadows will require the shader generator to be enabled on the scene.
Sets the flag indicating whether this light should cast shadows or not. The xsize and ysize parameters specify the size of the shadow buffer that will be set up, the sort parameter specifies the sort. Note that enabling shadows will require the shader generator to be enabled on the scene.
-
virtual void
write
(std::ostream &out, int indent_level = 0) const¶
-
static TypeHandle