panda3d.core.PolylightNode

from panda3d.core import PolylightNode
class PolylightNode

Bases: PandaNode

A PolylightNode

Inheritance diagram

Inheritance diagram of PolylightNode

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

Use PolylightNode() to construct a new PolylightNode object.

enable() → None

Enable this light

disable() → None

Disable this light

setPos(position: LPoint3) → None

Set this light’s position

setPos(x: float, y: float, z: float) → None

Set this light’s position

getPos() → LPoint3

Returns position as a LPoint3

Return type

LPoint3

setColor(color: LColor) → None

Set the light’s color…

setColor(r: float, g: float, b: float) → None

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

getColor() → LColor

Returns the light’s color as LColor

Return type

LColor

getColorScenegraph() → 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.

Return type

LColor

setRadius(r: float) → None

Set radius of the spherical light volume

getRadius() → float

Get radius of the spherical light volume

setAttenuation(type: Attenuation_Type) → bool

Set ALINEAR or AQUADRATIC attenuation

getAttenuation() → Attenuation_Type

Get “linear” or “quadratic” attenuation type

Return type

Attenuation_Type

setA0(a0: float) → None

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

setA1(a1: float) → None

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

setA2(a2: float) → None

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

getA0() → float

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

getA1() → float

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

getA2() → float

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

flickerOn() → None

Set flickering to true so at every loop this light’s color is varied based on flicker_type

flickerOff() → None

Turn flickering off

isFlickering() → bool

Check is this light is flickering

setFlickerType(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

getFlickerType() → Flicker_Type

Returns FRANDOM or FSIN

Return type

Flicker_Type

setOffset(offset: float) → None

Set the offset value for the random and sin flicker variations… used to tweak the flicker This value is added to the variation

getOffset() → float

Get the offset value for the random and sin flicker variations

setScale(scale: float) → None

Set the scale value for the random and sin flicker variations… used to tweak the flicker This value is multiplied with the variation

getScale() → float

Get the scale value for the random and sin flicker variations

setStepSize(step: float) → None

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

getStepSize() → float

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

setFreq(f: float) → None

Set frequency of sin flicker

getFreq() → float

Get frequency of sin flicker

compareTo(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.

isEnabled() → bool

Is this light is enabled/disabled?

static getClassType() → TypeHandle
Return type

TypeHandle

enum Flicker_Type
enumerator FRANDOM = 0
enumerator FSIN = 1
enumerator FCUSTOM = 2
enum Attenuation_Type
enumerator ALINEAR = 0
enumerator AQUADRATIC = 1