Public Types |
| enum | Attenuation_Type { ALINEAR,
AQUADRATIC
} |
| enum | Flicker_Type { FRANDOM,
FSIN,
FCUSTOM
} |
Public Member Functions |
| | PolylightNode (const string &name) |
| | Use PolylightNode() to construct a new PolylightNode object.
|
| int | compare_to (const PolylightNode &other) const |
| | Returns a number less than zero if this PolylightNode sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.
|
| void | disable () |
| | Disable this light.
|
| void | enable () |
| | Enable this light.
|
| LColor | flicker () const |
| | If flickering is on, the do_poly_light function in PolylightNodeEffect will compute this light's color based on the variations applied in this function Variation can be sin or random Use offset, scale and step_size to tweak Future addition: custom function variations to flicker.
|
| void | flicker_off () |
| | Turn flickering off.
|
| void | flicker_on () |
| | Set flickering to true so at every loop this light's color is varied based on flicker_type.
|
|
virtual TypeHandle | force_init_type () |
| PN_stdfloat | get_a0 () const |
| | Get the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
|
| PN_stdfloat | get_a1 () const |
| | Get the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
|
| PN_stdfloat | get_a2 () const |
| | Get the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
|
| Attenuation_Type | get_attenuation () const |
| | Get "linear" or "quadratic" attenuation type.
|
| LColor | get_color () const |
| | Returns the light's color as LColor.
|
| LColor | get_color_scenegraph () const |
| | This differs from get_color in that when applying the light color we need to make sure that a color flattening external to the PolylightNode is not ignored.
|
| Flicker_Type | get_flicker_type () const |
| | Returns FRANDOM or FSIN.
|
| PN_stdfloat | get_freq () const |
| | Get frequency of sin flicker.
|
| PN_stdfloat | get_offset () const |
| | Get the offset value for the random and sin flicker variations.
|
| LVecBase3 | get_pos () const |
| | Returns position as a LPoint3.
|
| PN_stdfloat | get_radius () const |
| | Get radius of the spherical light volume.
|
| PN_stdfloat | get_scale () const |
| | Get the scale value for the random and sin flicker variations.
|
| PN_stdfloat | get_step_size () const |
| | Get the step size for the sin function in flicker This is the increment size for the value supplied to the sin function.
|
|
virtual TypeHandle | get_type () const |
| bool | is_enabled () const |
| | Is this light is enabled/disabled?
|
| bool | is_flickering () const |
| | Check is this light is flickering.
|
| virtual PandaNode * | make_copy () const |
| | Returns a newly-allocated Node that is a shallow copy of this one.
|
| bool | operator!= (const PolylightNode &other) const |
| | Returns true if the two lights are not equivalent.
|
| bool | operator< (const PolylightNode &other) const |
| | Returns true if this PolylightNode sorts before the other one, false otherwise.
|
| bool | operator== (const PolylightNode &other) const |
| | Returns true if the two lights are equivalent that is, all their properties are same.
|
| virtual void | output (ostream &out) const |
| | Outputs the Namable.
|
| 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 (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...
|
| void | set_color (const LColor &color) |
| | Set the light's color...
|
| bool | set_flicker_type (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...
|
| void | set_pos (const LVecBase3 &position) |
| | Set this light's position.
|
| 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...
|
| 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.
|
| virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
| | Writes the contents of this object to the datagram for shipping out to a Bam file.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type PolylightNode.
|
Protected Member Functions |
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new CompassEffect.
|
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type CompassEffect is encountered in the Bam file.
|
A PolylightNode.
Definition at line 31 of file polylightNode.h.