##

OculusCamera.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_OCULUS_CAMERA_HH_
#define GAZEBO_OCULUS_CAMERA_HH_
#include <string>
#include "gazebo/rendering/Camera.hh"
namespace gazebo
{
namespace rendering
{
class OculusCameraPrivate;
class GZ_RENDERING_VISIBLE OculusCamera : public Camera
{
public: OculusCamera(const std::string &_name, ScenePtr _scene);
public: virtual ~OculusCamera();
public: void Load(sdf::ElementPtr _sdf);
public: void Load();
public: void Init();
public: virtual void Update();
public: virtual void PostRender();
public: void Fini();
public: void Resize(unsigned int _w, unsigned int _h);
public: void MoveToVisual(VisualPtr _visual);
public: void MoveToVisual(const std::string &_visualName);
public: virtual void SetRenderTarget(Ogre::RenderTarget *_target);
public: void AdjustAspect(double _v);
// Documentation inherited
public: virtual unsigned int GetImageWidth() const;
// Documentation inherited
public: virtual unsigned int GetImageHeight() const;
public: void ResetSensor();
public: bool Ready();
// Documentation inherited
protected: virtual void RenderImpl();
protected: virtual bool AttachToVisualImpl(VisualPtr _visual,
bool _inheritOrientation, double _minDist = 0,
double _maxDist = 0);
protected: virtual bool TrackVisualImpl(VisualPtr _visual);
private: void OnControl(ConstWorldControlPtr &_data);
private: void Oculus();
private: OculusCameraPrivate *dataPtr;
};
}
}
#endif
gazebo::rendering::OculusCamera::Init
void Init()
Initialize.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::OculusCamera::TrackVisualImpl
virtual bool TrackVisualImpl(VisualPtr _visual)
Set the camera to track a scene node.
gazebo::rendering::OculusCamera::GetImageWidth
virtual unsigned int GetImageWidth() const
gazebo::rendering::OculusCamera::OculusCamera
OculusCamera(const std::string &_name, ScenePtr _scene)
Constructor.
gazebo::rendering::OculusCamera::Load
void Load()
Generic load function.
gazebo::rendering::OculusCamera::AttachToVisualImpl
virtual bool AttachToVisualImpl(VisualPtr _visual, bool _inheritOrientation, double _minDist=0, double _maxDist=0)
Set the camera to be attached to a visual.
Camera.hh
gazebo::rendering::OculusCamera::~OculusCamera
virtual ~OculusCamera()
Destructor.
gazebo::rendering::OculusCamera::PostRender
virtual void PostRender()
Post render.
gazebo::rendering::OculusCamera::ResetSensor
void ResetSensor()
Reset the Oculus Rift sensor orientation.
gazebo::rendering::ScenePtr
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:82
gazebo::rendering::OculusCamera::AdjustAspect
void AdjustAspect(double _v)
Change screen aspect ratio.
gazebo::rendering::OculusCamera::MoveToVisual
void MoveToVisual(VisualPtr _visual)
Move the camera to focus on a visual.
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::OculusCamera
A camera used for user visualization of a scene.
Definition: OculusCamera.hh:36
gazebo::rendering::OculusCamera::SetRenderTarget
virtual void SetRenderTarget(Ogre::RenderTarget *_target)
Set to true to enable rendering.
gazebo::rendering::OculusCamera::RenderImpl
virtual void RenderImpl()
Implementation of the render call.
gazebo::rendering::OculusCamera::Update
virtual void Update()
Render the camera.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::rendering::OculusCamera::GetImageHeight
virtual unsigned int GetImageHeight() const
gazebo::rendering::OculusCamera::Ready
bool Ready()
Used to check if Oculus is plugged in and can be used.
gazebo::rendering::VisualPtr
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
gazebo::rendering::OculusCamera::Resize
void Resize(unsigned int _w, unsigned int _h)
Resize the camera.
gazebo::rendering::Camera
Basic camera sensor.
Definition: Camera.hh:84
gazebo::rendering::OculusCamera::Fini
void Fini()
Finialize.