Effect Chain Class. More...
#include <deEffectChain.h>
Public Member Functions | |
Constructors and Destructors | |
| deEffectChain () | |
| Creates a new effect chain. | |
| ~deEffectChain () | |
| Cleans up the world. | |
Effect management | |
| int | GetEffectCount () const |
| Retrieves the number of effects in the chain. | |
| deEffect * | GetEffectAt (int index) const |
| Retrieves the effect at the given index. | |
| bool | HasEffect (deEffect *effect) const |
| Determines if the given effect is already part of the chain. | |
| int | IndexOfEffect (deEffect *effect) const |
| Retrieves the position of the given effect in the chain or -1 if not part of it. | |
| void | AddEffect (deEffect *effect) |
| Adds the given effect to the chain. | |
| void | InsertEffect (deEffect *effect, int position) |
| Inserts the effect at the given position to the chain. | |
| void | RemoveEffect (deEffect *effect) |
| Removes the given effect from the chain. | |
| void | RemoveAllEffects () |
| Removes all effects from the chain. | |
| void | MoveEffect (deEffect *effect, int newPosition) |
| Moves the given effect to a new position. | |
Visiting | |
| void | VisitEffects (deEffectVisitor *visitor) |
| Visits all the effects in the chain. | |
Effect Chain Class.
An effect chain holds a list of effects that are execute in the order they have been added to the effect chain. The effect chain is a convenience class that works with effects of various types so you do not have to implement this every time. As this object is not reference counted in any way the user class is responsible to free the effect chain itself once the user class is destroyed.
| deEffectChain::deEffectChain | ( | ) |
Creates a new effect chain.
| deEffectChain::~deEffectChain | ( | ) |
Cleans up the world.
| void deEffectChain::AddEffect | ( | deEffect * | effect ) |
Adds the given effect to the chain.
Throws an exception if already in the chain.
| deEffect* deEffectChain::GetEffectAt | ( | int | index ) | const |
Retrieves the effect at the given index.
| int deEffectChain::GetEffectCount | ( | ) | const [inline] |
Retrieves the number of effects in the chain.
| bool deEffectChain::HasEffect | ( | deEffect * | effect ) | const |
Determines if the given effect is already part of the chain.
| int deEffectChain::IndexOfEffect | ( | deEffect * | effect ) | const |
Retrieves the position of the given effect in the chain or -1 if not part of it.
| void deEffectChain::InsertEffect | ( | deEffect * | effect, |
| int | position | ||
| ) |
Inserts the effect at the given position to the chain.
Throws an exception if already already part of it. The new effect is inserted at the given position moving all effects after it up one position.
| void deEffectChain::MoveEffect | ( | deEffect * | effect, |
| int | newPosition | ||
| ) |
Moves the given effect to a new position.
The effect is placed at the new position moving all effects after it up one position.
| void deEffectChain::RemoveAllEffects | ( | ) |
Removes all effects from the chain.
| void deEffectChain::RemoveEffect | ( | deEffect * | effect ) |
Removes the given effect from the chain.
| void deEffectChain::VisitEffects | ( | deEffectVisitor * | visitor ) |
Visits all the effects in the chain.
1.7.2