opensurgsim
SixenseDevice.h
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
17 #define SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
18 
19 #include <memory>
20 #include <string>
21 
22 #include "SurgSim/Input/CommonDevice.h"
23 
24 namespace SurgSim
25 {
26 namespace Devices
27 {
28 class SixenseScaffold;
29 
30 SURGSIM_STATIC_REGISTRATION(SixenseDevice);
31 
54 {
55 public:
59  explicit SixenseDevice(const std::string& uniqueName);
60 
61  SURGSIM_CLASSNAME(SurgSim::Devices::SixenseDevice);
62 
64  virtual ~SixenseDevice();
65 
66  bool initialize() override;
67 
68  bool isInitialized() const override;
69 
70 private:
71  friend class SixenseScaffold;
72 
73  bool finalize() override;
74 
75  std::shared_ptr<SixenseScaffold> m_scaffold;
76 };
77 
78 }; // namespace Devices
79 }; // namespace SurgSim
80 
81 #endif // SURGSIM_DEVICES_SIXENSE_SIXENSEDEVICE_H
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
A class that manages Sixense devices, such as the Razer Hydra.
Definition: SixenseScaffold.h:35
virtual ~SixenseDevice()
Destructor.
Definition: SixenseDevice.cpp:35
bool initialize() override
Fully initialize the device.
Definition: SixenseDevice.cpp:44
bool isInitialized() const override
Definition: SixenseDevice.cpp:67
A class implementing the communication with one Sixense controller, for example one of the two on the...
Definition: SixenseDevice.h:53
SixenseDevice(const std::string &uniqueName)
Constructor.
Definition: SixenseDevice.cpp:29
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35