opensurgsim
OpenNIDevice.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_OPENNI_OPENNIDEVICE_H
17 #define SURGSIM_DEVICES_OPENNI_OPENNIDEVICE_H
18 
19 #include "SurgSim/Input/CommonDevice.h"
20 
21 namespace SurgSim
22 {
23 namespace Devices
24 {
25 class OpenNIScaffold;
26 
27 SURGSIM_STATIC_REGISTRATION(OpenNIDevice);
28 
42 {
43 public:
46  explicit OpenNIDevice(const std::string& name);
47 
48  SURGSIM_CLASSNAME(SurgSim::Devices::OpenNIDevice);
49 
51  virtual ~OpenNIDevice();
52 
53  bool initialize() override;
54 
55  bool isInitialized() const override;
56 
57 private:
58  friend class OpenNIScaffold;
59 
60  bool finalize() override;
61 
62  std::shared_ptr<OpenNIScaffold> m_scaffold;
63 };
64 
65 };
66 };
67 
68 #endif //SURGSIM_DEVICES_OPENNI_OPENNIDEVICE_H
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
OpenNIDevice(const std::string &name)
Constructor.
Definition: OpenNIDevice.cpp:27
A class that manages OpenNI devices.
Definition: OpenNIScaffold.h:40
bool isInitialized() const override
Definition: OpenNIDevice.cpp:65
virtual ~OpenNIDevice()
Destructor.
Definition: OpenNIDevice.cpp:33
bool initialize() override
Fully initialize the device.
Definition: OpenNIDevice.cpp:42
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
A class implementing the communication with one OpenNI compatible depth camera.
Definition: OpenNIDevice.h:41