PolylightNode
- 
class PolylightNode
- Bases: - PandaNode- A PolylightNode - Inheritance diagram - 
explicit PolylightNode(std::string const &name)
 - 
PolylightNode(PolylightNode const&) = default
- Use - PolylightNode()to construct a new- PolylightNodeobject.
 - 
int compare_to(PolylightNode const &other) const
- Returns a number less than zero if this - PolylightNodesorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.- Two - PolylightNodesare considered equivalent if they consist of exactly the same properties Otherwise, they are different; different- PolylightNodeswill be ranked in a consistent but undefined ordering; the ordering is useful only for placing the- PolylightNodesin a sorted container like an STL set.
 - 
void disable(void)
- Disable this light 
 - 
void enable(void)
- Enable this light 
 - 
void flicker_off(void)
- Turn flickering off 
 - 
void flicker_on(void)
- Set flickering to true so at every loop this light’s color is varied based on flicker_type 
 - 
PN_stdfloat get_a0(void) const
- Get the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance) 
 - 
PN_stdfloat get_a1(void) const
- Get the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance) 
 - 
PN_stdfloat get_a2(void) const
- Get the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance) 
 - 
Attenuation_Type get_attenuation(void) const
- Get “linear” or “quadratic” attenuation type 
 - 
static TypeHandle get_class_type(void)
 - 
LColor get_color_scenegraph(void) const
- This differs from - get_colorin that when applying the light color we need to make sure that a color flattening external to the- PolylightNodeis not ignored.
 - 
Flicker_Type get_flicker_type(void) const
- Returns FRANDOM or FSIN 
 - 
PN_stdfloat get_freq(void) const
- Get frequency of sin flicker 
 - 
PN_stdfloat get_offset(void) const
- Get the offset value for the random and sin flicker variations 
 - 
PN_stdfloat get_radius(void) const
- Get radius of the spherical light volume 
 - 
PN_stdfloat get_scale(void) const
- Get the scale value for the random and sin flicker variations 
 - 
PN_stdfloat get_step_size(void) const
- Get the step size for the sin function in flicker This is the increment size for the value supplied to the sin function 
 - 
bool is_enabled(void) const
- Is this light is enabled/disabled? 
 - 
bool is_flickering(void) const
- Check is this light is flickering 
 - 
void set_a0(PN_stdfloat a0)
- Set the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance) 
 - 
void set_a1(PN_stdfloat a1)
- Set the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance) 
 - 
void set_a2(PN_stdfloat a2)
- Set the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance) 
 - 
bool set_attenuation(PolylightNode::Attenuation_Type type)
- Set ALINEAR or AQUADRATIC attenuation 
 - 
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b)
- Set the light’s color… - Set the light’s color… 3 floats between 0 and 1 
 - 
bool set_flicker_type(PolylightNode::Flicker_Type type)
- Flicker type can be FRANDOM or FSIN At a later point there might be a FCUSTOM Custom flicker will be a set of fix points recorded by animating the light’s intensity 
 - 
void set_freq(PN_stdfloat f)
- Set frequency of sin flicker 
 - 
void set_offset(PN_stdfloat offset)
- Set the offset value for the random and sin flicker variations… used to tweak the flicker This value is added to the variation 
 - 
void set_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
- Set this light’s position 
 - 
void set_radius(PN_stdfloat r)
- Set radius of the spherical light volume 
 - 
void set_scale(PN_stdfloat scale)
- Set the scale value for the random and sin flicker variations… used to tweak the flicker This value is multiplied with the variation 
 - 
void set_step_size(PN_stdfloat step)
- Set the step size for the sin function in flicker This is the increment size for the value supplied to the sin function 
 
- 
explicit PolylightNode(std::string const &name)
