PolylightEffect
-
class PolylightEffect
Bases:
RenderEffect
A PolylightEffect can be used on a node to define a
LightGroup
for that node. ALightGroup
containsPolylightNodes
which are essentially nodes that add color to the polygons of a model based on distance.PolylightNode
is a cheap way to get lighting effects specially for night scenesInheritance diagram
-
ConstPointerTo<RenderEffect> add_light(NodePath const &newlight) const
Add a
PolylightNode
object to this effect and return a new effect
-
static TypeHandle get_class_type(void)
-
ContribType get_contrib(void) const
Returns CT_all or CT_proximal
-
PN_stdfloat get_weight(void) const
Get the weight value
-
bool has_light(NodePath const &light) const
Returns true if the indicated light is listed in the
PolylightEffect
, false otherwise.
-
static ConstPointerTo<RenderEffect> make(void)
-
static ConstPointerTo<RenderEffect> make(PN_stdfloat weight, ContribType contrib, LPoint3 const &effect_center)
-
static ConstPointerTo<RenderEffect> make(PN_stdfloat weight, ContribType contrib, LPoint3 const &effect_center, LightGroup const &lights)
Constructs a new
PolylightEffect
object.
-
ConstPointerTo<RenderEffect> remove_light(NodePath const &newlight) const
Remove a light from this effect. Return the new updated effect
-
ConstPointerTo<RenderEffect> set_contrib(PolylightEffect::ContribType c) const
Set Contrib Type and return a new effect… the reason this couldnt be done through make was because that would return a new effect without the lightgroup which is static and cant be accessed Here, we just pass that to the make
-
ConstPointerTo<RenderEffect> set_effect_center(LPoint3 const &ec) const
Set weight and return a new effect… the reason this couldnt be done through make was because that would return a new effect without the lightgroup which is static and cant be accessed Here, we just pass that to the make
-
ConstPointerTo<RenderEffect> set_weight(PN_stdfloat w) const
Set weight and return a new effect… the reason this couldnt be done through make was because that would return a new effect without the lightgroup which is static and cant be accessed Here, we just pass that to the make
-
ConstPointerTo<RenderEffect> add_light(NodePath const &newlight) const