RenderEffects
-
class RenderEffects
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
-
ConstPointerTo<RenderEffects> add_effect(RenderEffect const *effect) const
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.
-
int find_effect(TypeHandle type) const
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 TypeHandle get_class_type(void)
-
RenderEffect const *get_effect(std::size_t n) const
-
RenderEffect const *get_effect(TypeHandle type) const
Returns the nth effect in the state.
Looks for a
RenderEffectof the indicated type in the state, and returns it if it is found, or NULL if it is not.
-
std::size_t get_num_effects(void) const
Returns the number of separate effects indicated in the state.
Deprecated: in Python, use len(effects) instead, or effects.size() in C++.
-
static int get_num_states(void)
Returns the total number of unique
RenderEffectsobjects allocated in the world. This will go up and down during normal operations.
-
bool is_empty(void) const
Returns true if the state is empty, false otherwise.
-
static void list_states(std::ostream &out)
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 ConstPointerTo<RenderEffects> make(RenderEffect const *effect)
-
static ConstPointerTo<RenderEffects> make(RenderEffect const *effect1, RenderEffect const *effect2)
-
static ConstPointerTo<RenderEffects> make(RenderEffect const *effect1, RenderEffect const *effect2, RenderEffect const *effect3)
-
static ConstPointerTo<RenderEffects> make(RenderEffect const *effect1, RenderEffect const *effect2, RenderEffect const *effect3, RenderEffect const *effect4)
Returns a
RenderEffectswith one effect set.Returns a
RenderEffectswith two effects set.Returns a
RenderEffectswith three effects set.Returns a
RenderEffectswith four effects set.
-
static ConstPointerTo<RenderEffects> make_empty(void)
Returns a
RenderEffectswith no effects set.
-
void output(std::ostream &out) const
-
ConstPointerTo<RenderEffects> remove_effect(TypeHandle type) const
Returns a new
RenderEffectsobject that represents the same as the source state, with the indicatedRenderEffectremoved.
-
std::size_t size(void) const
Returns the number of separate effects indicated in the state.
-
static bool validate_states(void)
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).
-
void write(std::ostream &out, int indent_level) const
-
ConstPointerTo<RenderEffects> add_effect(RenderEffect const *effect) const
