PolylightNode
from panda3d.core import PolylightNode
- class PolylightNode
Bases:
Bases:
PandaNodeA PolylightNode
Inheritance diagram
- __eq__()
Comparison methods
- __init__()
Use
PolylightNode()to construct a newPolylightNodeobject.
- __lt__()
- __ne__()
- compare_to()
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; differentPolylightNodeswill be ranked in a consistent but undefined ordering; the ordering is useful only for placing thePolylightNodesin a sorted container like an STL set.
- disable()
Disable this light
- enable()
Enable this light
- flicker_off()
Turn flickering off
- flicker_on()
Set flickering to true so at every loop this light’s color is varied based on flicker_type
- get_a0()
Get the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
- get_a1()
Get the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
- get_a2()
Get the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
- get_attenuation()
Get “linear” or “quadratic” attenuation type
- static get_class_type()
- get_color_scenegraph()
This differs from
get_color()in that when applying the light color we need to make sure that a color flattening external to thePolylightNodeis not ignored.
- get_flicker_type()
Returns FRANDOM or FSIN
- get_freq()
Get frequency of sin flicker
- get_offset()
Get the offset value for the random and sin flicker variations
- get_radius()
Get radius of the spherical light volume
- get_scale()
Get the scale value for the random and sin flicker variations
- get_step_size()
Get the step size for the sin function in flicker This is the increment size for the value supplied to the sin function
- is_enabled()
Is this light is enabled/disabled?
- is_flickering()
Check is this light is flickering
- set_a0()
Set the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
- set_a1()
Set the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
- set_a2()
Set the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance)
- set_attenuation()
Set ALINEAR or AQUADRATIC attenuation
- set_color()
Set the light’s color…
Set the light’s color… 3 floats between 0 and 1
- set_flicker_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
- set_freq()
Set frequency of sin flicker
- set_offset()
Set the offset value for the random and sin flicker variations… used to tweak the flicker This value is added to the variation
- set_pos()
Set this light’s position
Set this light’s position
- set_radius()
Set radius of the spherical light volume
- set_scale()
Set the scale value for the random and sin flicker variations… used to tweak the flicker This value is multiplied with the variation
- set_step_size()
Set the step size for the sin function in flicker This is the increment size for the value supplied to the sin function
