panda3d.core.PolylightEffect

from panda3d.core import PolylightEffect
class PolylightEffect

Bases: RenderEffect

A PolylightEffect can be used on a node to define a LightGroup for that node. A LightGroup contains PolylightNodes which are essentially nodes that add color to the polygons of a model based on distance. PolylightNode is a cheap way to get lighting effects specially for night scenes

Inheritance diagram

Inheritance diagram of PolylightEffect

static make() → RenderEffect

Constructs a new PolylightEffect object.

Return type

RenderEffect

static make(weight: float, contrib: ContribType, effect_center: LPoint3) → RenderEffect

Constructs a new PolylightEffect object.

Return type

RenderEffect

static make(weight: float, contrib: ContribType, effect_center: LPoint3, lights: LightGroup) → RenderEffect

Constructs a new PolylightEffect object.

Return type

RenderEffect

addLight(newlight: NodePath) → RenderEffect

Add a PolylightNode object to this effect and return a new effect

Return type

RenderEffect

removeLight(newlight: NodePath) → RenderEffect

Remove a light from this effect. Return the new updated effect

Return type

RenderEffect

setWeight(w: float) → RenderEffect

Set weight and return a new effect… the reason this couldnt be done through make was because that would return a new effect without the lightgroup which is static and cant be accessed Here, we just pass that to the make

Return type

RenderEffect

setContrib(c: ContribType) → RenderEffect

Set Contrib Type and return a new effect… the reason this couldnt be done through make was because that would return a new effect without the lightgroup which is static and cant be accessed Here, we just pass that to the make

Return type

RenderEffect

setEffectCenter(ec: LPoint3) → RenderEffect

Set weight and return a new effect… the reason this couldnt be done through make was because that would return a new effect without the lightgroup which is static and cant be accessed Here, we just pass that to the make

Return type

RenderEffect

getWeight() → float

Get the weight value

getContrib() → ContribType

Returns CT_all or CT_proximal

Return type

ContribType

getEffectCenter() → LPoint3

Return the value of the _effect_center

Return type

LPoint3

hasLight(light: NodePath) → bool

Returns true if the indicated light is listed in the PolylightEffect, false otherwise.

static getClassType() → TypeHandle
Return type

TypeHandle

enum ContribType
enumerator CT_proximal = 0
enumerator CT_all = 1
LightGroup

alias of pvector_NodePath