opensurgsim
IdentityPoseDevice.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_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
17 #define SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_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 SURGSIM_STATIC_REGISTRATION(IdentityPoseDevice);
29 
39 {
40 public:
43  explicit IdentityPoseDevice(const std::string& uniqueName);
44 
45  SURGSIM_CLASSNAME(SurgSim::Devices::IdentityPoseDevice);
46 
47  bool addInputConsumer(std::shared_ptr<SurgSim::Input::InputConsumerInterface> inputConsumer) override;
48 
49  bool initialize() override;
50 
51  bool isInitialized() const override;
52 
53 protected:
56 
57 private:
58  bool finalize() override;
59 
61  bool m_initialized;
62 };
63 
64 
65 }; // namespace Devices
66 }; // namespace SurgSim
67 
68 #endif // SURGSIM_DEVICES_IDENTITYPOSEDEVICE_IDENTITYPOSEDEVICE_H
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
A class implementing the identity pose device, which is a pretend device that doesn&#39;t move...
Definition: IdentityPoseDevice.h:38
A collection of NamedData objects.
Definition: DataGroup.h:68
bool initialize() override
Fully initialize the device.
Definition: IdentityPoseDevice.cpp:41
A class that implements some common management code on top of the DeviceInterface.
Definition: CommonDevice.h:35
IdentityPoseDevice(const std::string &uniqueName)
Constructor.
Definition: IdentityPoseDevice.cpp:35
static SurgSim::DataStructures::DataGroup buildInputData()
Builds the data layout for the application input (i.e. device output).
Definition: IdentityPoseDevice.cpp:62
bool addInputConsumer(std::shared_ptr< SurgSim::Input::InputConsumerInterface > inputConsumer) override
Adds an input consumer that will be notified when the application input state is updated.
Definition: IdentityPoseDevice.cpp:69
bool isInitialized() const override
Definition: IdentityPoseDevice.cpp:49