24 #include <boost/signals2.hpp>
29 #include <unordered_map>
34 class DtJoystickManager;
46 functionGroup(orig.functionGroup), function(orig.function), configuration(orig.configuration)
51 std::string functionGroup;
69 virtual void tick(
bool sentEvents)
override;
72 virtual void gameControllerDeviceRemoved(
int)
override;
75 virtual void gameControllerDeviceAdded(
int)
override;
80 virtual bool enableJoystickFunctions(
const std::string& configuration,
const std::set<std::string>& functionalGroups,
81 std::set<std::string>& enabled);
84 virtual bool inControlOfConfiguration(
const std::string& configuration)
const;
88 virtual bool disableJoystickFunctions(
const std::set<std::string>& functionalGroups,
89 std::set<std::string>& disabled);
92 virtual std::set<std::string> controlledFunctionGroups()
const;
95 virtual bool canFunctionGroupBeAssigned(
const std::string& functionGroup)
const;
104 virtual bool anyFunctionGroupsActive()
const;
107 virtual void releaseAllControllerInformation();
114 virtual bool isFunctionGroupActive(
const std::string& configuration,
const std::string&)
const;
117 virtual void activateFunctionGroup(
const std::string& configuration,
const std::string&);
120 virtual void deactivateFunctionGroup(
const std::string& configuration,
const std::string&);
122 virtual void switchControlOfFunction(
const std::string& configuration,
const std::string& functionGroup);
125 virtual void noQueuedEvents()
override;
129 virtual void gameControlInformationAdded(
const std::string& configuration,
const std::string& functionGroup,
135 virtual bool joystickFunctionFired(
const std::string& functionGroup,
const std::string&
function,
136 double value,
bool repeat,
bool valueChanged) = 0;
155 typedef std::unordered_map<std::string, ControlStruct>
InControlOf;
165 typedef std::unordered_map<DtGameControlProcessor*, std::pair<ControlStatus, DtGenericControllerEvent*> >
RepeatQueue;
std::vector< ControlStatus > ControlStatusVector
Devices that are controlled and their current status.
Definition: joystickFunctionEnableHandler.h:140
Control processors that are keeping track of current values by function group and function...
Definition: joystickFunctionEnableHandler.h:42
LastJoystickAxisValue myLastJoystickAxisValue
Definition: joystickFunctionEnableHandler.h:162
std::map< std::string, ControlStatusVector > ControlStatusMap
By function group.
Definition: joystickFunctionEnableHandler.h:143
InControlOf myInControlOf
Definition: joystickFunctionEnableHandler.h:156
Handler that you insert into the manager to be made aware of game controller events. A subclass of this handler can be added to the joystick manager to be made aware of any joystick/keyboard event.
Definition: joystickManager.h:47
This class will be used to query about current joysticks and the capabilities they might have...
Definition: joystickManager.h:101
ControlStatus()
Definition: joystickFunctionEnableHandler.h:44
std::set< std::string > functionGroups
Definition: joystickFunctionEnableHandler.h:149
std::unordered_map< DtGameControlProcessor *, std::pair< ControlStatus, DtGenericControllerEvent * > > RepeatQueue
Queue of funcutons that wish to get a repeat of an event if that event is not triggered (such as a bu...
Definition: joystickFunctionEnableHandler.h:165
std::unordered_map< std::string, ControlStruct > InControlOf
Configurations that are controlled and their current switch status.
Definition: joystickFunctionEnableHandler.h:155
Definition: joystickFunctionEnableHandler.h:147
Definition: gameControllerEvents.h:33
DtSignalConnectionManager myConnections
Definition: joystickFunctionEnableHandler.h:159
#define DT_DLL_JOYSTICKCORE
Contains DLL export macros.
Definition: joystickCore.h:25
Handler that will manage the objects that are taken control of for joystick controls and process the ...
Definition: joystickFunctionEnableHandler.h:38
Contains makVrv::DtVirtualBaseClass class.
DtDe & myDe
Definition: joystickFunctionEnableHandler.h:168
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::map< std::string, std::set< std::string > > switchGroups
Definition: joystickFunctionEnableHandler.h:150
std::string configuration
Definition: joystickFunctionEnableHandler.h:53
Base class to provide boost signal/slot management.
RepeatQueue myRepeatQueue
Definition: joystickFunctionEnableHandler.h:166
std::map< int, std::map< int, int > > LastJoystickAxisValue
Definition: joystickFunctionEnableHandler.h:161
virtual ~ControlStatus()
Definition: joystickFunctionEnableHandler.h:49
std::map< std::string, int > switchGroupsIndex
Definition: joystickFunctionEnableHandler.h:151
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
std::map< int, ControlStatusMap > ControlledDevices
Definition: joystickFunctionEnableHandler.h:144
std::shared_ptr< DtGameControlProcessor > controlProcessor
Definition: joystickFunctionEnableHandler.h:54
DtJoystickManager & myJoystickManager
Definition: joystickFunctionEnableHandler.h:158
ControlStatus(const ControlStatus &orig)
Definition: joystickFunctionEnableHandler.h:45
ControlledDevices myControlledDevices
Definition: joystickFunctionEnableHandler.h:145