Go to the documentation of this file.
18 #ifndef GAZEBO_OCULUS_CAMERA_HH_
19 #define GAZEBO_OCULUS_CAMERA_HH_
29 class OculusCameraPrivate;
48 public:
void Load(sdf::ElementPtr _sdf);
57 public:
virtual void Update();
60 public:
virtual void PostRender();
68 public:
void Resize(
unsigned int _w,
unsigned int _h);
72 public:
void MoveToVisual(
VisualPtr _visual);
76 public:
void MoveToVisual(
const std::string &_visualName);
82 public:
virtual void SetRenderTarget(Ogre::RenderTarget *_target);
86 public:
void AdjustAspect(
double _v);
89 public:
virtual unsigned int GetImageWidth()
const;
92 public:
virtual unsigned int GetImageHeight()
const;
95 public:
void ResetSensor();
102 protected:
virtual void RenderImpl();
115 protected:
virtual bool AttachToVisualImpl(
VisualPtr _visual,
116 bool _inheritOrientation,
double _minDist = 0,
117 double _maxDist = 0);
124 protected:
virtual bool TrackVisualImpl(
VisualPtr _visual);
128 private:
void OnControl(ConstWorldControlPtr &_data);
131 private:
void Oculus();
135 private: OculusCameraPrivate *dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
virtual bool TrackVisualImpl(VisualPtr _visual)
Set the camera to track a scene node.
virtual unsigned int GetImageWidth() const
OculusCamera(const std::string &_name, ScenePtr _scene)
Constructor.
void Load()
Generic load function.
virtual bool AttachToVisualImpl(VisualPtr _visual, bool _inheritOrientation, double _minDist=0, double _maxDist=0)
Set the camera to be attached to a visual.
virtual ~OculusCamera()
Destructor.
virtual void PostRender()
Post render.
void ResetSensor()
Reset the Oculus Rift sensor orientation.
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:82
void AdjustAspect(double _v)
Change screen aspect ratio.
void MoveToVisual(VisualPtr _visual)
Move the camera to focus on a visual.
A camera used for user visualization of a scene.
Definition: OculusCamera.hh:36
virtual void SetRenderTarget(Ogre::RenderTarget *_target)
Set to true to enable rendering.
virtual void RenderImpl()
Implementation of the render call.
virtual void Update()
Render the camera.
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
virtual unsigned int GetImageHeight() const
bool Ready()
Used to check if Oculus is plugged in and can be used.
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
void Resize(unsigned int _w, unsigned int _h)
Resize the camera.
Basic camera sensor.
Definition: Camera.hh:81