AGX Dynamics  2.35.0.1
SensorManager.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 #ifndef AGXSENSOR_SENSORMANAGER
17 #define AGXSENSOR_SENSORMANAGER
18 
19 #include <agxSensor/export.h>
20 #include <agx/Singleton.h>
21 
23 namespace OIS
24 {
25  class InputManager;
26 }
28 
29 namespace agxSensor
30 {
31 
34  {
35  public:
36  SINGLETON_CLASSNAME_METHOD();
37 
39  virtual void shutdown() override;
40 
46  bool init( agx::Int mWin );
47 
51  OIS::InputManager* getInputManager();
52 
55 
56  static bool hasShutdown();
57 
58  protected:
59  virtual ~SensorManager();
60 
61  private:
62  OIS::InputManager* m_InputManager;
63  static SensorManager* s_ois;
64  static bool s_hasShutdown;
65  };
66 }
67 
69 #define OIS_MANAGER() agxSensor::SensorManager::instance()->getInputManager()
70 
71 #endif
#define AGXSENSOR_EXPORT
Class which controls all sensors, initialization, destruction etc.
Definition: SensorManager.h:34
static SensorManager * instance()
virtual void shutdown() override
Implement this method to cleanup your Singleton class.
bool init(agx::Int mWin)
Initializes the SensorManager with a valid window pointer.
OIS::InputManager * getInputManager()
static bool hasShutdown()
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
Definition: Singleton.h:31
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
The agxSensor namespace contains drivers for reading for devices such as Gamepad.
int32_t Int
Definition: Integer.h:35