LightLensNode¶
from panda3d.core import 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
getClassType
() → TypeHandle¶
-
getShadowBuffer
(gsg: GraphicsStateGuardianBase) → GraphicsOutputBase¶ 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.
-
getShadowBufferSize
() → LVecBase2i¶ Returns the size of the shadow buffer to be created for this light source.
-
getShadowBufferSort
() → int¶ Returns the sort of the shadow buffer to be created for this light source.
-
hasSpecularColor
() → bool¶ Returns true if this light defines a specular color, false if the specular color is derived automatically from the light color.
-
output
(out: ostream)¶ We have to explicitly publish these because they resolve the multiple inheritance.
-
setShadowBufferSize
(size: LVecBase2i)¶ Sets the size of the shadow buffer to be created for this light source.
-
setShadowCaster
(caster: bool)¶ 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.
-
setShadowCaster
(caster: bool, buffer_xsize: int, buffer_ysize: int, sort: int) 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.
-
property
shadow_buffer_size
→ LVecBase2i¶ Returns/Sets the size of the shadow buffer to be created for this light source.
-
static