OculusView.h
Go to the documentation of this file.
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_OCULUS_OCULUSVIEW_H
17 #define SURGSIM_DEVICES_OCULUS_OCULUSVIEW_H
18 
19 #include <memory>
20 #include <osg/ref_ptr>
21 #include <string>
22 
24 
25 namespace osg
26 {
27 class DisplaySettings;
28 }
29 
30 namespace SurgSim
31 {
32 
33 namespace Framework
34 {
35 class Component;
36 }
37 
38 namespace Input
39 {
40 class InputComponent;
41 }
42 
43 namespace Devices
44 {
45 
46 SURGSIM_STATIC_REGISTRATION(OculusView);
47 
50 {
51 public:
54  explicit OculusView(const std::string& name);
55 
57  ~OculusView();
58 
60 
64  void setInputComponent(std::shared_ptr<Framework::Component> input);
65 
67  std::shared_ptr<Input::InputComponent> getInputComponent() const;
68 
69 protected:
70  osg::ref_ptr<osg::DisplaySettings> createDisplaySettings() const override;
71 
72 private:
74  std::shared_ptr<Input::InputComponent> m_inputComponent;
75 };
76 
77 }; // namespace Graphics
78 }; // namespace SurgSim
79 
80 #endif // SURGSIM_DEVICES_OCULUS_OCULUSVIEW_H
SurgSim::Devices::OculusView::~OculusView
~OculusView()
Destructor.
Definition: OculusView.cpp:52
SurgSim::Devices::OculusView::setInputComponent
void setInputComponent(std::shared_ptr< Framework::Component > input)
Set the InputComponent this view connects to.
Definition: OculusView.cpp:56
SurgSim::Devices::OculusView::OculusView
OculusView(const std::string &name)
Constructor.
Definition: OculusView.cpp:33
SurgSim::Devices::OculusView::createDisplaySettings
osg::ref_ptr< osg::DisplaySettings > createDisplaySettings() const override
Definition: OculusView.cpp:66
SurgSim::Graphics::OsgView
OSG-based implementation of graphics view class.
Definition: OsgView.h:56
osg
Definition: OculusView.h:25
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
OsgView.h
SurgSim::Devices::OculusView
OculusView is a customization of SurgSim::Graphics::OsgView with projection matrices pulled from the ...
Definition: OculusView.h:49
SurgSim::Devices::OculusView::m_inputComponent
std::shared_ptr< Input::InputComponent > m_inputComponent
The InputComponent this view connects.
Definition: OculusView.h:74
SurgSim::Devices::OculusView::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Devices::OculusView)
SurgSim::Devices::OculusView::getInputComponent
std::shared_ptr< Input::InputComponent > getInputComponent() const
Definition: OculusView.cpp:61
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38