OculusCameraPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 Open Source Robotics Foundation
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 */
17 #ifndef _GAZEBO_RENDERING_OCULUS_CAMERA_PRIVATE_HH_
18 #define _GAZEBO_RENDERING_OCULUS_CAMERA_PRIVATE_HH_
19 
20 #include <OVR_CAPI.h>
21 #include "gazebo/util/system.hh"
22 
23 namespace Ogre
24 {
25  class Camera;
26  class Viewport;
27  class SceneManager;
28 }
29 
30 namespace gazebo
31 {
32  namespace rendering
33  {
36  {
39  : rightCamera(NULL),
40  externalCamera(NULL),
41  rightViewport(NULL),
42  externalViewport(NULL),
43  externalSceneManager(NULL),
44  node(NULL),
45  controlSub(NULL),
46  ready(false),
47  frameIndex(1),
48  oculusTrackingWarned(false) {}
49 
51  public: Ogre::Camera *rightCamera;
52 
55  public: Ogre::Camera *externalCamera;
56 
58  public: Ogre::Viewport *rightViewport;
59 
61  public: Ogre::Viewport *externalViewport;
62 
65  public: Ogre::SceneManager *externalSceneManager;
66 
68  public: ovrHmd hmd;
69 
72 
75 
77  public: bool ready;
78 
80  public: Ogre::TexturePtr renderTextureRight;
81 
83  public: Ogre::TexturePtr renderTextureLeft;
84 
86  public: unsigned int frameIndex;
87 
90  public: bool oculusTrackingWarned;
91  };
92  }
93 }
94 #endif
ovrHmd hmd
An Oculus Head-Mounted display.
Definition: OculusCameraPrivate.hh:68
unsigned int frameIndex
Frame index used for oculus timing.
Definition: OculusCameraPrivate.hh:86
Ogre::Viewport * externalViewport
View port for the external camera.
Definition: OculusCameraPrivate.hh:61
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
OculusCameraPrivate()
Constructor.
Definition: OculusCameraPrivate.hh:38
Ogre::Viewport * rightViewport
View port for the right camera.
Definition: OculusCameraPrivate.hh:58
bool ready
True when Oculus is connected and ready to use.
Definition: OculusCameraPrivate.hh:77
Ogre::TexturePtr renderTextureLeft
Left camera render texture.
Definition: OculusCameraPrivate.hh:83
Ogre::SceneManager * externalSceneManager
External scene manager.
Definition: OculusCameraPrivate.hh:65
#define GZ_RENDERING_VISIBLE
Definition: system.hh:209
Ogre::Camera * rightCamera
Ogre camera for the right Oculus screen.
Definition: OculusCameraPrivate.hh:51
transport::NodePtr node
Transport node for using gazebo pub/sub.
Definition: OculusCameraPrivate.hh:71
Private data for the Oculus Camera class.
Definition: OculusCameraPrivate.hh:35
#define NULL
Definition: CommonTypes.hh:31
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
bool oculusTrackingWarned
Flag used to prevent multiple messages from being displayed.
Definition: OculusCameraPrivate.hh:90
Ogre::Camera * externalCamera
Camera in the external scene that render the distortion meshes.
Definition: OculusCameraPrivate.hh:55
transport::SubscriberPtr controlSub
Subscriber used to receive updates on world_control topic.
Definition: OculusCameraPrivate.hh:74
Ogre::TexturePtr renderTextureRight
Right camera render texture.
Definition: OculusCameraPrivate.hh:80