PolylightNode

from panda3d.core import PolylightNode
class PolylightNode

Bases:

Bases: PandaNode

A PolylightNode

Inheritance diagram

Inheritance diagram of PolylightNode

enum Attenuation_Type
enumerator ALINEAR = 0
enumerator AQUADRATIC = 1
enum Flicker_Type
enumerator FRANDOM = 0
enumerator FSIN = 1
enumerator FCUSTOM = 2
__eq__(other: PolylightNode) bool

Comparison methods

__init__(param0: PolylightNode)
__init__(name: str)

Use PolylightNode() to construct a new PolylightNode object.

__lt__(other: PolylightNode) bool
__ne__(other: PolylightNode) bool
compare_to(other: PolylightNode) int

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.

Two PolylightNodes are considered equivalent if they consist of exactly the same properties Otherwise, they are different; different PolylightNodes will be ranked in a consistent but undefined ordering; the ordering is useful only for placing the PolylightNodes in 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() float

Get the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance)

get_a1() float

Get the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance)

get_a2() float

Get the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance)

get_attenuation() Attenuation_Type

Get “linear” or “quadratic” attenuation type

static get_class_type() TypeHandle
get_color() LColor

Returns the light’s color as LColor

get_color_scenegraph() LColor

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.

get_flicker_type() Flicker_Type

Returns FRANDOM or FSIN

get_freq() float

Get frequency of sin flicker

get_offset() float

Get the offset value for the random and sin flicker variations

get_pos() LPoint3

Returns position as a LPoint3

get_radius() float

Get radius of the spherical light volume

get_scale() float

Get the scale value for the random and sin flicker variations

get_step_size() float

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() bool

Is this light is enabled/disabled?

is_flickering() bool

Check is this light is flickering

set_a0(a0: float)

Set the quadratic attenuation factor a0 fd = 1 / ( a0 + a1*distance + a2*distance*distance)

set_a1(a1: float)

Set the quadratic attenuation factor a1 fd = 1 / ( a0 + a1*distance + a2*distance*distance)

set_a2(a2: float)

Set the quadratic attenuation factor a2 fd = 1 / ( a0 + a1*distance + a2*distance*distance)

set_attenuation(type: Attenuation_Type) bool

Set ALINEAR or AQUADRATIC attenuation

set_color(color: LColor)

Set the light’s color…

set_color(r: float, g: float, b: float)

Set the light’s color… 3 floats between 0 and 1

set_flicker_type(type: Flicker_Type) bool

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(f: float)

Set frequency of sin flicker

set_offset(offset: float)

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(position: LPoint3)

Set this light’s position

set_pos(x: float, y: float, z: float)

Set this light’s position

set_radius(r: float)

Set radius of the spherical light volume

set_scale(scale: float)

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(step: float)

Set the step size for the sin function in flicker This is the increment size for the value supplied to the sin function