Controller System
C4Controller.h

class Controller

The Controller class manages a dynamic node in a scene graph.
Definition

class Controller : public ListElement<Controller>, public Registrable<Controller, ControllerRegistration>, public Packable, public Configurable

Member Functions
Controller::New Constructs a new controller of a particular type.
Controller::GetControllerType Returns the controller type.
Controller::GetControllerIndex Returns the World Manager controller index.
Controller::GetTargetNode Returns the node to which a controller is attached.
Controller::ValidNode Returns a boolean value indicating whether the controller can be assigned to a particular node.
Controller::Activate Called when the controller is activated by a trigger.
Controller::Deactivate Called when the trigger that activated a controller is deactivated.
 
Controller::Preprocess Performs any preprocessing that a controller needs to do before being used in a world.
Controller::Move Performs any per-frame movement or processing that a controller needs to do.
Controller::Update Performs any processing that must be done before the node to which a controller is attached is rendered.
Controller::EnterZone Called when the node to which a controller is attached enters a zone.
Controller::ExitZone Called when the node to which a controller is attached exits a zone.
Controller::SetDetailLevel Called when the detail level for the target node changes.
Controller::Invalidate Indicates that a controller needs to be updated.
 
Controller::ConstructMessage Called to construct a cotroller-defined message.
Controller::ReceiveMessage Called to process a controller-defined message.
Controller::SendInitialStateMessages Called to send messages containing the controller's state to a new player.
Controller::HandleInteractionEvent Called to handle an event for an interactive node.
Constructor

Controller(ControllerType type = kControllerGeneric);

Parameters
type The controller type.
Description


Base Classes
ListElement<Controller> Used internally by the World Manager.
Registrable<Controller, ControllerRegistration> Custom controller types can be registered with the engine.
Packable Controllers can be packed for storage in resources.
Configurable Controllers can define configurable parameters that are exposed as user interface elements in the World Editor.
See Also
ControllerReg