class Modifier
Defined in:
Every modifier that can be attached to an instance node is a subclass of the C4Modifiers.h
Modifier
class.
Definition
class Modifier : public ListElement<Modifier>, public Packable, public Configurable, public Registrable<Modifier, ModifierRegistration>
Member Functions
Modifier::GetModifierType |
Returns the modifier type. |
Modifier::ValidInstance |
Returns a boolean value indicating whether the modifier can be assigned to a particular instance node. |
Modifier::ApplyModifier |
Applies a modifier to an instanced world. |
Modifier::KeepNode |
Returns a boolean value indicating whether a node should be included in a particular copy of an instanced world. |
Constructor
Modifier(ModifierType type);
Parameters
type |
The modifier type. |
Description
The Modifier
class is an object attached to an instance node that causes the instanced world to be altered in some way when it is loaded into the scene. An application may define its own custom modifiers, and they become visible in the World Editor.A custom modifier type is defined by creating a subclass of the
Modifier
class. For the modifier type to be visible in the World Editor, it is also necessary to construct an associated ModifierReg
object. All registered custom modifiers should override the operator ==
function so that modifiers can be compared for equality by the World Editor.A custom modifier can expose its data to the World Editor by implementing the functions of the
Configurable
base class.
Base Classes
ListElement<Modifier> |
Modifiers are stored in a list attached to an instance node. |
Packable |
Modifiers can be packed for storage in resources. |
Configurable |
Modifiers can define configurable parameters that are exposed as user interface widgets in the World Editor. |
Registrable<Modifier, ModifierRegistration> |
Custom modifier types can be registered with the engine. |
See Also
Wiki Articles