RenderEffects
from panda3d.core import RenderEffects
- class RenderEffects
Bases:
Bases:
TypedWritableReferenceCountThis represents a unique collection of
RenderEffectobjects that correspond to a particular renderable state.You should not attempt to create or modify a RenderEffects object directly. Instead, call one of the
make()functions to create one for you. And instead of modifying a RenderEffects object, create a new one.Inheritance diagram
- __getitem__(type: TypeHandle) RenderEffect
Returns the effect in the state with the given type.
- __getitem__(n: int) RenderEffect
Returns the nth effect in the state.
- __lt__(other: RenderEffects) bool
- addEffect(effect: RenderEffect) RenderEffects
Returns a new
RenderEffectsobject that represents the same as the source state, with the newRenderEffectadded. If there is already aRenderEffectwith the same type, it is replaced.
- findEffect(type: TypeHandle) int
Searches for an effect with the indicated type in the state, and returns its index if it is found, or -1 if it is not.
- static getClassType() TypeHandle
- getEffect(type: TypeHandle) RenderEffect
Looks for a
RenderEffectof the indicated type in the state, and returns it if it is found, or NULL if it is not.
- getEffect(n: int) RenderEffect
Returns the nth effect in the state.
- getNumEffects() int
Returns the number of separate effects indicated in the state.
Deprecated: in Python, use len(effects) instead, or effects.size() in C++.
- static getNumStates() int
Returns the total number of unique
RenderEffectsobjects allocated in the world. This will go up and down during normal operations.
- static listStates(out: ostream)
Lists all of the
RenderEffectsin the cache to the output stream, one per line. This can be quite a lot of output if the cache is large, so be prepared.
- static make(effect: RenderEffect) RenderEffects
Returns a
RenderEffectswith one effect set.
- static make(effect1: RenderEffect, effect2: RenderEffect) RenderEffects
Returns a
RenderEffectswith two effects set.
- static make(effect1: RenderEffect, effect2: RenderEffect, effect3: RenderEffect) RenderEffects
Returns a
RenderEffectswith three effects set.
- static make(effect1: RenderEffect, effect2: RenderEffect, effect3: RenderEffect, effect4: RenderEffect) RenderEffects
Returns a
RenderEffectswith four effects set.
- static makeEmpty() RenderEffects
Returns a
RenderEffectswith no effects set.
- removeEffect(type: TypeHandle) RenderEffects
Returns a new
RenderEffectsobject that represents the same as the source state, with the indicatedRenderEffectremoved.
- static validateStates() bool
Ensures that the cache is still stored in sorted order. Returns true if so, false if there is a problem (which implies someone has modified one of the supposedly-const
RenderEffectsobjects).
