![]() |
VR-Forces Developer's Guide
|
Handler that will manage the objects that are taken control of for joystick controls and process the events to apply to them via the joystickFunctionFired() pure method.

Classes | |
| struct | ControlStatus |
| struct | ControlStruct |
Public Member Functions | |
| DtJoystickFunctionEnableHandler (DtDe &) | |
| virtual | ~DtJoystickFunctionEnableHandler () |
| virtual bool | gameControllerEvent (DtGenericControllerEvent *) |
| virtual void | tick (bool sentEvents) |
| virtual void | gameControllerDeviceRemoved (int) |
| virtual void | gameControllerDeviceAdded (int) |
| virtual bool | enableJoystickFunctions (const std::string &configuration, const std::set< std::string > &functionalGroups, std::set< std::string > &enabled) |
| virtual bool | inControlOfConfiguration (const std::string &configuration) const |
| virtual bool | disableJoystickFunctions (const std::set< std::string > &functionalGroups, std::set< std::string > &disabled) |
| virtual std::set< std::string > | controlledFunctionGroups () const |
| virtual bool | canFunctionGroupBeAssigned (const std::string &functionGroup) const |
| virtual bool | eventActive (DtGenericControllerEvent *sdlEvent) const |
| virtual bool | canProcessEvent (DtGenericControllerEvent *sdlEvent) const |
| virtual bool | anyFunctionGroupsActive () const |
| virtual void | releaseAllControllerInformation () |
Public Member Functions inherited from makVrv::DtGameControllerEventHandler | |
| DtGameControllerEventHandler () | |
| virtual | ~DtGameControllerEventHandler () |
Protected Types | |
| typedef std::vector < ControlStatus > | ControlStatusVector |
| typedef std::map< std::string, ControlStatusVector > | ControlStatusMap |
| typedef std::map< int, ControlStatusMap > | ControlledDevices |
| typedef boost::unordered_map < std::string, ControlStruct > | InControlOf |
| typedef std::map< int, std::map< int, int > > | LastJoystickAxisValue |
| typedef boost::unordered_map < DtGameControlProcessor *, std::pair< ControlStatus, DtGenericControllerEvent * > > | RepeatQueue |
Protected Member Functions | |
| virtual bool | filterGameControllerEvent (DtGenericControllerEvent *) |
| virtual bool | isFunctionGroupActive (const std::string &configuration, const std::string &) const |
| virtual void | activateFunctionGroup (const std::string &configuration, const std::string &) |
| virtual void | deactivateFunctionGroup (const std::string &configuration, const std::string &) |
| virtual void | switchControlOfFunction (const std::string &configuration, const std::string &functionGroup) |
| virtual void | noQueuedEvents () |
| virtual void | gameControlInformationAdded (const std::string &configuration, const std::string &functionGroup, const std::string &function, const DtGameControlInformation &i) |
| virtual bool | joystickFunctionFired (const std::string &functionGroup, const std::string &function, double value, bool repeat, bool valueChanged)=0 |
|
protected |
Devices that are controlled and their current status.
|
protected |
By function group.
|
protected |
|
protected |
Configurations that are controlled and their current switch status.
|
protected |
|
protected |
Queue of funcutons that wish to get a repeat of an event if that event is not triggered (such as a button press)
| makVrv::DtJoystickFunctionEnableHandler::DtJoystickFunctionEnableHandler | ( | DtDe & | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Return true to handle the event and not allow other events to handle.
Implements makVrv::DtGameControllerEventHandler.
|
virtual |
Called after game controller events are processed in any given tick. If sentEvents is true some game controller event was sent this tick.
Reimplemented from makVrv::DtGameControllerEventHandler.
|
virtual |
Called when a game controller device is removed.
Reimplemented from makVrv::DtGameControllerEventHandler.
Reimplemented in makVrf::DtVrfGuiJoystickControlHandler.
|
virtual |
Called when a game controller device is added.
Reimplemented from makVrv::DtGameControllerEventHandler.
|
virtual |
Enables the joystick function for handling via this handler, if not already enabled. If not already, will increase lock count of joystick manager for changes. The last parameter will contain the list of functions enabled.
|
virtual |
Whether or not this handler is in control of the configuration.
|
virtual |
Disables the joystick functions, if enabled. If no functions are controlled will decrease lock count on joystick manager. If no function groups are given all controlled groups are cleared.
|
virtual |
Function groups currently controlled.
|
virtual |
Returns true if this function group is not already in control of something.
|
virtual |
Returns true if this event is active in any game processor.
|
virtual |
Returns true if the event can be processed by any of the game processors.
Reimplemented from makVrv::DtGameControllerEventHandler.
|
virtual |
Returns true if there are any function groups active.
|
virtual |
Releases control of all used configuration and function groups.
|
protectedvirtual |
Return true to filter this Game controller Event.
Reimplemented from makVrv::DtGameControllerEventHandler.
|
protectedvirtual |
Returns true if this function group is active. This will return true if any function within the group is active.
|
protectedvirtual |
Will activate all functions within the function group.
|
protectedvirtual |
Will deactivate all functions within the function group.
|
protectedvirtual |
|
protectedvirtual |
Called when there were events but now there are no longer queued events.
Reimplemented from makVrv::DtGameControllerEventHandler.
|
protectedvirtual |
Called when game controller information is added or updated for the given configuration, function group and function. Update game control information if controlled.
Reimplemented from makVrv::DtGameControllerEventHandler.
|
protectedpure virtual |
Called when a game control processor fires off. Implement this to do something with the given function group, function and value of the processor. Return false to continue to look for another handler which might implement this event. Value changed will be true if the value has changed from the last period.
Implemented in makVrf::DtVrfGuiJoystickControlHandler, and makVrv::DtJoystickObserverControl.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |