afxEffectGroupData
A datablock that describes an Effect Group.
Public Attributes
bool
...
int
...
float
...
float
...
float
...
bool
...
char
...
float
...
Public Functions
void
pushEffect(afxEffectBaseData effect)
Adds an effect (wrapper or group) to an effect-group.
void
reset()
Resets an effect-group datablock during reload.
Detailed Description
A datablock that describes an Effect Group.
afxEffectGroupData provides a way for adding several effects to a choreographer as a group and can be used wherever an afxEffectWrapperData is used. Basically, an effect-group is a simple list of effect-wrappers. When an effect-group is added to a choreographer, the end result is almost the same as adding all of the group's effect-wrappers directly to the choreographer. The main difference is that the grouped effects can be turned on and off collectively and created in multiples. Effect-groups can also contain other effect-groups, forming a hierarchy of effects.
A great strength of effect-groups is that they have a count setting that multiplies the number of times the effects in the group are added to the owning choreographer and this doesn't happen until the choreographer instance is created and launched. This makes a big difference for certain kinds of effects, such as fireworks, that tend to consist of small groupings of effects that are repeated many times with slight variations. With groups, an effect like this has a very compact representation for transmitting from server to clients, that only expands when actually used.
Effect-groups with a count greater than one are extremely useful when some of the effects use field substitutions. When an effect-group is expanded, it essentially runs through a for-loop from 0 to count-1 and creates a new set of effect instances each time through the loop. For each new set of effects, their group-index is set to the index of this for-loop, which in turn replaces the ## token used in any field substitutions in the child effects. In essence, the for-loop index becomes a parameter of the child effects which can be used to vary the effects created in each loop.
Public Attributes
afxEffectBaseData addEffect
...
bool assignIndices
...
int count
...
float delay
...
float fadeInTime
...
float fadeOutTime
...
bool groupEnabled
...
char indexOffset
...
float lifetime
...
Public Functions
pushEffect(afxEffectBaseData effect)
Adds an effect (wrapper or group) to an effect-group.
reset()
Resets an effect-group datablock during reload.