OculusCamera Class Reference

A camera used for user visualization of a scene. More...

#include <rendering/rendering.hh>

Inherits Camera.

Public Member Functions

 OculusCamera (const std::string &_name, ScenePtr _scene)
 Constructor. More...
 
virtual ~OculusCamera ()
 Destructor. More...
 
void AdjustAspect (double _v)
 Change screen aspect ratio. More...
 
float AspectRatio () const
 Get the apect ratio. More...
 
void AttachToVisual (const std::string &_visualName, const bool _inheritOrientation, const double _minDist=0.0, const double _maxDist=0.0)
 Attach the camera to a scene node. More...
 
void AttachToVisual (uint32_t _id, const bool _inheritOrientation, const double _minDist=0.0, const double _maxDist=0.0)
 Attach the camera to a scene node. More...
 
virtual float AvgFPS () const
 Get the average FPS. More...
 
void CameraToViewportRay (const int _screenx, const int _screeny, ignition::math::Vector3d &_origin, ignition::math::Vector3d &_dir) const
 Get a world space ray as cast from the camera through the viewport. More...
 
bool CaptureData () const
 Return the value of this->captureData. More...
 
event::ConnectionPtr ConnectNewImageFrame (std::function< void(const unsigned char *, unsigned int, unsigned int, unsigned int, const std::string &)> _subscriber)
 Connect to the new image signal. More...
 
void CreateRenderTexture (const std::string &_textureName)
 Set the render target. More...
 
ignition::math::Vector3d Direction () const
 Get the camera's direction vector. More...
 
void DisconnectNewImageFrame (event::ConnectionPtr &_c)
 Disconnect from an image frame. More...
 
void EnableSaveFrame (const bool _enable)
 Enable or disable saving. More...
 
double FarClip () const
 Get the far clip distance. More...
 
void Fini ()
 Finialize. More...
 
float GetAspectRatio () const GAZEBO_DEPRECATED(7.0)
 Get the apect ratio. More...
 
virtual float GetAvgFPS () const GAZEBO_DEPRECATED(7.0)
 Get the average FPS. More...
 
void GetCameraToViewportRay (int _screenx, int _screeny, math::Vector3 &_origin, math::Vector3 &_dir) GAZEBO_DEPRECATED(7.0)
 Get a world space ray as cast from the camera through the viewport. More...
 
bool GetCaptureData () const GAZEBO_DEPRECATED(7.0)
 Return the value of this->captureData. More...
 
math::Vector3 GetDirection () const GAZEBO_DEPRECATED(7.0)
 Get the camera's direction vector. More...
 
DistortionPtr GetDistortion () const GAZEBO_DEPRECATED(7.0)
 Get the distortion model of this camera. More...
 
double GetFarClip () GAZEBO_DEPRECATED(7.0)
 Get the far clip distance. More...
 
math::Angle GetHFOV () const GAZEBO_DEPRECATED(7.0)
 Get the camera FOV (horizontal) More...
 
size_t GetImageByteSize () const GAZEBO_DEPRECATED(7.0)
 Get the image size in bytes. More...
 
virtual const unsigned char * GetImageData (unsigned int i=0) GAZEBO_DEPRECATED(7.0)
 Get a pointer to the image data. More...
 
unsigned int GetImageDepth () const GAZEBO_DEPRECATED(7.0)
 Get the depth of the image. More...
 
std::string GetImageFormat () const GAZEBO_DEPRECATED(7.0)
 Get the string representation of the image format. More...
 
virtual unsigned int GetImageHeight () const
 Get the height of the image. More...
 
virtual unsigned int GetImageWidth () const
 Get the width of the image. More...
 
bool GetInitialized () const GAZEBO_DEPRECATED(7.0)
 Return true if the camera has been initialized. More...
 
common::Time GetLastRenderWallTime () GAZEBO_DEPRECATED(7.0)
 Get the last time the camera was rendered. More...
 
std::string GetName () const GAZEBO_DEPRECATED(7.0)
 Get the camera's unscoped name. More...
 
double GetNearClip () GAZEBO_DEPRECATED(7.0)
 Get the near clip distance. More...
 
Ogre::Camera * GetOgreCamera () const GAZEBO_DEPRECATED(7.0)
 Get a pointer to the ogre camera. More...
 
std::string GetProjectionType () const GAZEBO_DEPRECATED(7.0)
 Return the projection type as a string. More...
 
double GetRenderRate () const GAZEBO_DEPRECATED(7.0)
 Get the render Hz rate. More...
 
Ogre::Texture * GetRenderTexture () const GAZEBO_DEPRECATED(7.0)
 Get the render texture. More...
 
math::Vector3 GetRight () GAZEBO_DEPRECATED(7.0)
 Get the viewport right vector. More...
 
ScenePtr GetScene () const
 Get the scene this camera is in. More...
 
Ogre::SceneNode * GetSceneNode () const GAZEBO_DEPRECATED(7.0)
 Get the camera's scene node. More...
 
std::string GetScopedName () const GAZEBO_DEPRECATED(7.0)
 Get the camera's scoped name (scene_name::camera_name) More...
 
std::string GetScreenshotPath () const GAZEBO_DEPRECATED(7.0)
 Get the path to saved screenshots. More...
 
unsigned int GetTextureHeight () const GAZEBO_DEPRECATED(7.0)
 Get the height of the off-screen render texture. More...
 
unsigned int GetTextureWidth () const GAZEBO_DEPRECATED(7.0)
 Get the width of the off-screen render texture. More...
 
virtual unsigned int GetTriangleCount () const GAZEBO_DEPRECATED(7.0)
 Get the triangle count. More...
 
math::Vector3 GetUp () GAZEBO_DEPRECATED(7.0)
 Get the viewport up vector. More...
 
math::Angle GetVFOV () const GAZEBO_DEPRECATED(7.0)
 Get the camera FOV (vertical) More...
 
Ogre::Viewport * GetViewport () const GAZEBO_DEPRECATED(7.0)
 Get a pointer to the Ogre::Viewport. More...
 
unsigned int GetViewportHeight () const GAZEBO_DEPRECATED(7.0)
 Get the viewport height in pixels. More...
 
unsigned int GetViewportWidth () const GAZEBO_DEPRECATED(7.0)
 Get the viewport width in pixels. More...
 
unsigned int GetWindowId () const GAZEBO_DEPRECATED(7.0)
 Get the ID of the window this camera is rendering into. More...
 
bool GetWorldPointOnPlane (int _x, int _y, const math::Plane &_plane, math::Vector3 &_result) GAZEBO_DEPRECATED(7.0)
 Get point on a plane. More...
 
math::Pose GetWorldPose () const GAZEBO_DEPRECATED(7.0)
 Get the world pose. More...
 
math::Vector3 GetWorldPosition () const GAZEBO_DEPRECATED(7.0)
 Get the camera position in the world. More...
 
math::Quaternion GetWorldRotation () const GAZEBO_DEPRECATED(7.0)
 Get the camera's orientation in the world. More...
 
double GetZValue (int _x, int _y) GAZEBO_DEPRECATED(7.0)
 Get the Z-buffer value at the given image coordinate. More...
 
ignition::math::Angle HFOV () const
 Get the camera FOV (horizontal) More...
 
size_t ImageByteSize () const
 Get the image size in bytes. More...
 
virtual const unsigned char * ImageData (const unsigned int i=0) const
 Get a pointer to the image data. More...
 
unsigned int ImageDepth () const
 Get the depth of the image. More...
 
std::string ImageFormat () const
 Get the string representation of the image format. More...
 
virtual unsigned int ImageHeight () const
 Get the height of the image. More...
 
virtual unsigned int ImageWidth () const
 Get the width of the image. More...
 
void Init ()
 Initialize. More...
 
bool Initialized () const
 Return true if the camera has been initialized. More...
 
bool IsAnimating () const
 Return true if the camera is moving due to an animation. More...
 
bool IsVisible (VisualPtr _visual)
 Return true if the visual is within the camera's view frustum. More...
 
bool IsVisible (const std::string &_visualName)
 Return true if the visual is within the camera's view frustum. More...
 
common::Time LastRenderWallTime () const
 Get the last time the camera was rendered. More...
 
DistortionPtr LensDistortion () const
 Get the distortion model of this camera. More...
 
void Load (sdf::ElementPtr _sdf)
 Load the user camera. More...
 
void Load ()
 Generic load function. More...
 
virtual bool MoveToPosition (const math::Pose &_pose, double _time)
 Move the camera to a position (this is an animated motion). More...
 
virtual bool MoveToPosition (const ignition::math::Pose3d &_pose, const double _time)
 Move the camera to a position (this is an animated motion). More...
 
bool MoveToPositions (const std::vector< math::Pose > &_pts, double _time, std::function< void()> _onComplete=NULL) GAZEBO_DEPRECATED(7.0)
 Move the camera to a series of poses (this is an animated motion). More...
 
bool MoveToPositions (const std::vector< ignition::math::Pose3d > &_pts, const double _time, std::function< void()> _onComplete=NULL)
 Move the camera to a series of poses (this is an animated motion). More...
 
void MoveToVisual (VisualPtr _visual)
 Move the camera to focus on a visual. More...
 
void MoveToVisual (const std::string &_visualName)
 Move the camera to focus on a visual. More...
 
std::string Name () const
 Get the camera's unscoped name. More...
 
double NearClip () const
 Get the near clip distance. More...
 
Ogre::Camera * OgreCamera () const
 Get a pointer to the ogre camera. More...
 
Ogre::Viewport * OgreViewport () const
 Get a pointer to the Ogre::Viewport. More...
 
void Pitch (const math::Angle &_angle, Ogre::Node::TransformSpace _relativeTo=Ogre::Node::TS_LOCAL) GAZEBO_DEPRECATED(7.0)
 Rotate the camera around the y-axis. More...
 
void Pitch (const ignition::math::Angle &_angle, ReferenceFrame _relativeTo=RF_LOCAL)
 Rotate the camera around the y-axis. More...
 
virtual void PostRender ()
 Post render. More...
 
ignition::math::Vector2i Project (const ignition::math::Vector3d &_pt) const
 Project 3D world coordinates to 2D screen coordinates. More...
 
ignition::math::Matrix4d ProjectionMatrix () const
 Return the projection matrix of this camera. More...
 
std::string ProjectionType () const
 Return the projection type as a string. More...
 
bool Ready ()
 Used to check if Oculus is plugged in and can be used. More...
 
void Render (const bool _force=false)
 Render the camera. More...
 
double RenderRate () const
 Get the render Hz rate. More...
 
Ogre::Texture * RenderTexture () const
 Get the render texture. More...
 
void ResetSensor ()
 Reset the Oculus Rift sensor orientation. More...
 
void Resize (unsigned int _w, unsigned int _h)
 Resize the camera. More...
 
ignition::math::Vector3d Right () const
 Get the viewport right vector. More...
 
void Roll (const math::Angle &_angle, Ogre::Node::TransformSpace _relativeTo=Ogre::Node::TS_LOCAL) GAZEBO_DEPRECATED(7.0)
 Rotate the camera around the x-axis. More...
 
void Roll (const ignition::math::Angle &_angle, ReferenceFrame _relativeTo=RF_LOCAL)
 Rotate the camera around the x-axis. More...
 
bool SaveFrame (const std::string &_filename)
 Save the last frame to disk. More...
 
Ogre::SceneNode * SceneNode () const
 Get the camera's scene node. More...
 
std::string ScopedName () const
 Get the camera's scoped name (scene_name::camera_name) More...
 
std::string ScreenshotPath () const
 Get the path to saved screenshots. More...
 
void SetAspectRatio (float _ratio)
 Set the aspect ratio. More...
 
void SetCaptureData (const bool _value)
 Set whether to capture data. More...
 
void SetCaptureDataOnce ()
 Capture data once and save to disk. More...
 
virtual void SetClipDist (const float _near, const float _far)
 Set the clip distances. More...
 
void SetHFOV (math::Angle _angle) GAZEBO_DEPRECATED(7.0)
 Set the camera FOV (horizontal) More...
 
void SetHFOV (const ignition::math::Angle &_angle)
 Set the camera FOV (horizontal) More...
 
void SetImageHeight (const unsigned int _h)
 Set the image height. More...
 
void SetImageSize (const unsigned int _w, const unsigned int _h)
 Set the image size. More...
 
void SetImageWidth (const unsigned int _w)
 Set the image height. More...
 
void SetName (const std::string &_name)
 Set the camera's name. More...
 
virtual bool SetProjectionType (const std::string &_type)
 Set the type of projection used by the camera. More...
 
void SetRenderRate (const double _hz)
 Set the render Hz rate. More...
 
virtual void SetRenderTarget (Ogre::RenderTarget *_target)
 Set to true to enable rendering. More...
 
void SetSaveFramePathname (const std::string &_pathname)
 Set the save frame pathname. More...
 
void SetScene (ScenePtr _scene)
 Set the scene this camera is viewing. More...
 
void SetSceneNode (Ogre::SceneNode *_node)
 Set the camera's scene node. More...
 
void SetWindowId (unsigned int _windowId)
 
virtual void SetWorldPose (const math::Pose &_pose) GAZEBO_DEPRECATED(7.0)
 Set the global pose of the camera. More...
 
virtual void SetWorldPose (const ignition::math::Pose3d &_pose)
 Set the global pose of the camera. More...
 
void SetWorldPosition (const math::Vector3 &_pos) GAZEBO_DEPRECATED(7.0)
 Set the world position. More...
 
void SetWorldPosition (const ignition::math::Vector3d &_pos)
 Set the world position. More...
 
void SetWorldRotation (const math::Quaternion &_quat) GAZEBO_DEPRECATED(7.0)
 Set the world orientation. More...
 
void SetWorldRotation (const ignition::math::Quaterniond &_quat)
 Set the world orientation. More...
 
void ShowWireframe (const bool _s)
 Set whether to view the world in wireframe. More...
 
unsigned int TextureHeight () const
 Get the height of the off-screen render texture. More...
 
unsigned int TextureWidth () const
 Get the width of the off-screen render texture. More...
 
void ToggleShowWireframe ()
 Toggle whether to view the world in wireframe. More...
 
void TrackVisual (const std::string &_visualName)
 Set the camera to track a scene node. More...
 
void Translate (const math::Vector3 &_direction) GAZEBO_DEPRECATED(7.0)
 Translate the camera. More...
 
void Translate (const ignition::math::Vector3d &_direction)
 Translate the camera. More...
 
virtual unsigned int TriangleCount () const
 Get the triangle count. More...
 
ignition::math::Vector3d Up () const
 Get the viewport up vector. More...
 
virtual void Update ()
 Render the camera. More...
 
ignition::math::Angle VFOV () const
 Get the camera FOV (vertical) More...
 
unsigned int ViewportHeight () const
 Get the viewport height in pixels. More...
 
unsigned int ViewportWidth () const
 Get the viewport width in pixels. More...
 
unsigned int WindowId () const
 Get the ID of the window this camera is rendering into. More...
 
bool WorldPointOnPlane (const int _x, const int _y, const ignition::math::Planed &_plane, ignition::math::Vector3d &_result)
 Get point on a plane. More...
 
ignition::math::Pose3d WorldPose () const
 Get the world pose. More...
 
ignition::math::Vector3d WorldPosition () const
 Get the camera position in the world. More...
 
ignition::math::Quaterniond WorldRotation () const
 Get the camera's orientation in the world. More...
 
void Yaw (const math::Angle &_angle, Ogre::Node::TransformSpace _relativeTo=Ogre::Node::TS_WORLD) GAZEBO_DEPRECATED(7.0)
 Rotate the camera around the z-axis. More...
 
void Yaw (const ignition::math::Angle &_angle, ReferenceFrame _relativeTo=RF_WORLD)
 Rotate the camera around the z-axis. More...
 
double ZValue (const int _x, const int _y)
 Get the Z-buffer value at the given image coordinate. More...
 

Static Public Member Functions

static size_t GetImageByteSize (unsigned int _width, unsigned int _height, const std::string &_format) GAZEBO_DEPRECATED(7.0)
 Calculate image byte size base on a few parameters. More...
 
static size_t ImageByteSize (const unsigned int _width, const unsigned int _height, const std::string &_format)
 Calculate image byte size base on a few parameters. More...
 
static bool SaveFrame (const unsigned char *_image, const unsigned int _width, const unsigned int _height, const int _depth, const std::string &_format, const std::string &_filename)
 Save a frame using an image buffer. More...
 

Protected Member Functions

virtual void AnimationComplete ()
 Internal function used to indicate that an animation has completed. More...
 
virtual bool AttachToVisualImpl (VisualPtr _visual, bool _inheritOrientation, double _minDist=0, double _maxDist=0)
 Set the camera to be attached to a visual. More...
 
virtual bool AttachToVisualImpl (const std::string &_name, const bool _inheritOrientation, const double _minDist=0, const double _maxDist=0)
 Attach the camera to a scene node. More...
 
virtual bool AttachToVisualImpl (uint32_t _id, const bool _inheritOrientation, const double _minDist=0, const double _maxDist=0)
 Attach the camera to a scene node. More...
 
std::string FrameFilename ()
 Get the next frame filename based on SDF parameters. More...
 
std::string GetFrameFilename () GAZEBO_DEPRECATED(7.0)
 Get the next frame filename based on SDF parameters. More...
 
void ReadPixelBuffer ()
 Read image data from pixel buffer. More...
 
virtual void RenderImpl ()
 Implementation of the render call. More...
 
virtual bool TrackVisualImpl (VisualPtr _visual)
 Set the camera to track a scene node. More...
 
bool TrackVisualImpl (const std::string &_visualName)
 Implementation of the Camera::TrackVisual call. More...
 
virtual void UpdateFOV ()
 Update the camera's field of view. More...
 

Protected Attributes

Ogre::AnimationState * animState
 Animation state, used to animate the camera. More...
 
unsigned char * bayerFrameBuffer
 Buffer for a bayer image frame. More...
 
Ogre::Camera * camera
 The OGRE camera. More...
 
bool captureData
 True to capture frames into an image buffer. More...
 
bool captureDataOnce
 True to capture a frame once and save to disk. More...
 
std::vector< event::ConnectionPtrconnections
 The camera's event connections. More...
 
int imageFormat
 Format for saving images. More...
 
int imageHeight
 Save image height. More...
 
int imageWidth
 Save image width. More...
 
bool initialized
 True if initialized. More...
 
common::Time lastRenderWallTime
 Time the last frame was rendered. More...
 
std::string name
 Name of the camera. More...
 
bool newData
 True if new data is available. More...
 
event::EventT< void(const unsigned char *, unsigned int, unsigned int, unsigned int, const std::string &)> newImageFrame
 Event triggered when a new frame is generated. More...
 
std::function< void()> onAnimationComplete
 User callback for when an animation completes. More...
 
common::Time prevAnimTime
 Previous time the camera animation was updated. More...
 
Ogre::RenderTarget * renderTarget
 Target that renders frames. More...
 
Ogre::Texture * renderTexture
 Texture that receives results from rendering. More...
 
std::list< msgs::Request > requests
 List of requests. More...
 
unsigned int saveCount
 Number of saved frames. More...
 
unsigned char * saveFrameBuffer
 Buffer for a single image frame. More...
 
ScenePtr scene
 Pointer to the scene. More...
 
Ogre::SceneNode * sceneNode
 Scene node that controls camera position and orientation. More...
 
std::string scopedName
 Scene scoped name of the camera. More...
 
std::string scopedUniqueName
 Scene scoped name of the camera with a unique ID. More...
 
std::string screenshotPath
 Path to saved screenshots. More...
 
sdf::ElementPtr sdf
 Camera's SDF values. More...
 
unsigned int textureHeight
 Height of the render texture. More...
 
unsigned int textureWidth
 Width of the render texture. More...
 
Ogre::Viewport * viewport
 Viewport the ogre camera uses. More...
 
unsigned int windowId
 ID of the window that the camera is attached to. More...
 

Detailed Description

A camera used for user visualization of a scene.

Constructor & Destructor Documentation

§ OculusCamera()

OculusCamera ( const std::string &  _name,
ScenePtr  _scene 
)

Constructor.

Parameters
[in]_nameName of the camera.
[in]_sceneScene to put the camera in.

§ ~OculusCamera()

virtual ~OculusCamera ( )
virtual

Destructor.

Member Function Documentation

§ AdjustAspect()

void AdjustAspect ( double  _v)

Change screen aspect ratio.

Parameters
[in]_vAspect ratio.

§ AnimationComplete()

virtual void AnimationComplete ( )
protectedvirtualinherited

Internal function used to indicate that an animation has completed.

Reimplemented in UserCamera.

§ AspectRatio()

float AspectRatio ( ) const
inherited

Get the apect ratio.

Returns
The aspect ratio (width / height) in pixels

§ AttachToVisual() [1/2]

void AttachToVisual ( const std::string &  _visualName,
const bool  _inheritOrientation,
const double  _minDist = 0.0,
const double  _maxDist = 0.0 
)
inherited

Attach the camera to a scene node.

Parameters
[in]_visualNameName of the visual to attach the camera to
[in]_inheritOrientationTrue means camera acquires the visual's orientation
[in]_minDistMinimum distance the camera is allowed to get to the visual
[in]_maxDistMaximum distance the camera is allowd to get from the visual

§ AttachToVisual() [2/2]

void AttachToVisual ( uint32_t  _id,
const bool  _inheritOrientation,
const double  _minDist = 0.0,
const double  _maxDist = 0.0 
)
inherited

Attach the camera to a scene node.

Parameters
[in]_idID of the visual to attach the camera to
[in]_inheritOrientationTrue means camera acquires the visual's orientation
[in]_minDistMinimum distance the camera is allowed to get to the visual
[in]_maxDistMaximum distance the camera is allowd to get from the visual

§ AttachToVisualImpl() [1/3]

virtual bool AttachToVisualImpl ( VisualPtr  _visual,
bool  _inheritOrientation,
double  _minDist = 0,
double  _maxDist = 0 
)
protectedvirtual

Set the camera to be attached to a visual.

This causes the camera to move in relation to the specified visual.

Parameters
[in]_visualThe visual to attach to.
[in]_inheritOrientationTrue if the camera should also rotate when the visual rotates.
[in]_minDistMinimum distance the camera can get to the visual.
[in]_maxDistMaximum distance the camera can get from the visual.
Returns
True if successfully attach to the visual.

Reimplemented from Camera.

§ AttachToVisualImpl() [2/3]

virtual bool AttachToVisualImpl ( const std::string &  _name,
const bool  _inheritOrientation,
const double  _minDist = 0,
const double  _maxDist = 0 
)
protectedvirtualinherited

Attach the camera to a scene node.

Parameters
[in]_visualNameName of the visual to attach the camera to
[in]_inheritOrientationTrue means camera acquires the visual's orientation
[in]_minDistMinimum distance the camera is allowed to get to the visual
[in]_maxDistMaximum distance the camera is allowd to get from the visual
Returns
True on success

§ AttachToVisualImpl() [3/3]

virtual bool AttachToVisualImpl ( uint32_t  _id,
const bool  _inheritOrientation,
const double  _minDist = 0,
const double  _maxDist = 0 
)
protectedvirtualinherited

Attach the camera to a scene node.

Parameters
[in]_idID of the visual to attach the camera to
[in]_inheritOrientationTrue means camera acquires the visual's orientation
[in]_minDistMinimum distance the camera is allowed to get to the visual
[in]_maxDistMaximum distance the camera is allowd to get from the visual
Returns
True on success

§ AvgFPS()

virtual float AvgFPS ( ) const
virtualinherited

Get the average FPS.

Returns
The average frames per second

§ CameraToViewportRay()

void CameraToViewportRay ( const int  _screenx,
const int  _screeny,
ignition::math::Vector3d &  _origin,
ignition::math::Vector3d &  _dir 
) const
inherited

Get a world space ray as cast from the camera through the viewport.

Parameters
[in]_screenxX coordinate in the camera's viewport, in pixels.
[in]_screenyY coordinate in the camera's viewport, in pixels.
[out]_originOrigin in the world coordinate frame of the resulting ray
[out]_dirDirection of the resulting ray
Deprecated:
See function that accepts ignition::math parameters.

§ CaptureData()

bool CaptureData ( ) const
inherited

Return the value of this->captureData.

Returns
True if the camera is set to capture data.

§ ConnectNewImageFrame()

event::ConnectionPtr ConnectNewImageFrame ( std::function< void(const unsigned char *, unsigned int, unsigned int, unsigned int, const std::string &)>  _subscriber)
inherited

Connect to the new image signal.

Parameters
[in]_subscriberCallback that is called when a new image is generated
Returns
A pointer to the connection. This must be kept in scope.

§ CreateRenderTexture()

void CreateRenderTexture ( const std::string &  _textureName)
inherited

Set the render target.

Parameters
[in]_textureNameName of the new render texture

§ Direction()

ignition::math::Vector3d Direction ( ) const
inherited

Get the camera's direction vector.

Returns
Direction the camera is facing

§ DisconnectNewImageFrame()

void DisconnectNewImageFrame ( event::ConnectionPtr _c)
inherited

Disconnect from an image frame.

Parameters
[in]_cThe connection to disconnect

§ EnableSaveFrame()

void EnableSaveFrame ( const bool  _enable)
inherited

Enable or disable saving.

Parameters
[in]_enableSet to True to enable saving of frames

§ FarClip()

double FarClip ( ) const
inherited

Get the far clip distance.

Returns
Far clip distance

§ Fini()

void Fini ( )
virtual

Finialize.

Reimplemented from Camera.

§ FrameFilename()

std::string FrameFilename ( )
protectedinherited

Get the next frame filename based on SDF parameters.

Returns
The frame's filename

§ GetAspectRatio()

float GetAspectRatio ( ) const
inherited

Get the apect ratio.

Returns
The aspect ratio (width / height) in pixels
Deprecated:
See AspectRatio()

§ GetAvgFPS()

virtual float GetAvgFPS ( ) const
virtualinherited

Get the average FPS.

Returns
The average frames per second
Deprecated:
See AvgFPS()

§ GetCameraToViewportRay()

void GetCameraToViewportRay ( int  _screenx,
int  _screeny,
math::Vector3 _origin,
math::Vector3 _dir 
)
inherited

Get a world space ray as cast from the camera through the viewport.

Parameters
[in]_screenxX coordinate in the camera's viewport, in pixels.
[in]_screenyY coordinate in the camera's viewport, in pixels.
[out]_originOrigin in the world coordinate frame of the resulting ray
[out]_dirDirection of the resulting ray
Deprecated:
See function that accepts ignition::math parameters.
See also
CameraToViewportRay

§ GetCaptureData()

bool GetCaptureData ( ) const
inherited

Return the value of this->captureData.

Returns
True if the camera is set to capture data.
Deprecated:
See CaptureData()

§ GetDirection()

math::Vector3 GetDirection ( ) const
inherited

Get the camera's direction vector.

Returns
Direction the camera is facing
Deprecated:
See function that returns an ignition::math object.
See also
Direction

§ GetDistortion()

DistortionPtr GetDistortion ( ) const
inherited

Get the distortion model of this camera.

Returns
Distortion model.
Deprecated:
See LensDistortion() const;

§ GetFarClip()

double GetFarClip ( )
inherited

Get the far clip distance.

Returns
Far clip distance
Deprecated:
See FarClip()

§ GetFrameFilename()

std::string GetFrameFilename ( )
protectedinherited

Get the next frame filename based on SDF parameters.

Returns
The frame's filename
Deprecated:
See FrameFilename()

§ GetHFOV()

math::Angle GetHFOV ( ) const
inherited

Get the camera FOV (horizontal)

Returns
The horizontal field of view
Deprecated:
See function that returns an ignition::math object.
See also
HFOV

§ GetImageByteSize() [1/2]

size_t GetImageByteSize ( ) const
inherited

Get the image size in bytes.

Returns
Size in bytes
Deprecated:
See ImageByteSize()

§ GetImageByteSize() [2/2]

static size_t GetImageByteSize ( unsigned int  _width,
unsigned int  _height,
const std::string &  _format 
)
staticinherited

Calculate image byte size base on a few parameters.

Parameters
[in]_widthWidth of an image
[in]_heightHeight of an image
[in]_formatImage format
Returns
Size of an image based on the parameters
Deprecated:
See ImageByteSize()

§ GetImageData()

virtual const unsigned char* GetImageData ( unsigned int  i = 0)
virtualinherited

Get a pointer to the image data.

Get the raw image data from a camera's buffer.

Parameters
[in]_iIndex of the camera's texture (0 = RGB, 1 = depth).
Returns
Pointer to the raw data, null if data is not available.
Deprecated:
See ImageData()

§ GetImageDepth()

unsigned int GetImageDepth ( ) const
inherited

Get the depth of the image.

Returns
Depth of the image
Deprecated:
See ImageDepth()

§ GetImageFormat()

std::string GetImageFormat ( ) const
inherited

Get the string representation of the image format.

Returns
String representation of the image format.
Deprecated:
See ImageFormat()

§ GetImageHeight()

virtual unsigned int GetImageHeight ( ) const
virtual

Get the height of the image.

Returns
Image height
Deprecated:
See ImageHeight()

Reimplemented from Camera.

§ GetImageWidth()

virtual unsigned int GetImageWidth ( ) const
virtual

Get the width of the image.

Returns
Image width
Deprecated:
See ImageWidth()

Reimplemented from Camera.

§ GetInitialized()

bool GetInitialized ( ) const
inherited

Return true if the camera has been initialized.

Returns
True if initialized was successful
Deprecated:
See Initialized()

§ GetLastRenderWallTime()

common::Time GetLastRenderWallTime ( )
inherited

Get the last time the camera was rendered.

Returns
Time the camera was last rendered
Deprecated:
See LastRenderWallTime()

§ GetName()

std::string GetName ( ) const
inherited

Get the camera's unscoped name.

Returns
The name of the camera
Deprecated:
See Name()

§ GetNearClip()

double GetNearClip ( )
inherited

Get the near clip distance.

Returns
Near clip distance
Deprecated:
See NearClip()

§ GetOgreCamera()

Ogre::Camera* GetOgreCamera ( ) const
inherited

Get a pointer to the ogre camera.

Returns
Pointer to the OGRE camera
Deprecated:
See OgreCamera()

§ GetProjectionType()

std::string GetProjectionType ( ) const
inherited

Return the projection type as a string.

Returns
"perspective" or "orthographic"
See also
SetProjectionType(const std::string &_type)
Deprecated:
See ProjectionType()

§ GetRenderRate()

double GetRenderRate ( ) const
inherited

Get the render Hz rate.

Returns
The Hz rate
Deprecated:
See RenderRate()

§ GetRenderTexture()

Ogre::Texture* GetRenderTexture ( ) const
inherited

Get the render texture.

Returns
Pointer to the render texture
Deprecated:
See RenderTexture()

§ GetRight()

math::Vector3 GetRight ( )
inherited

Get the viewport right vector.

Returns
The viewport right vector
Deprecated:
See function that returns an ignition::math object.
See also
Right

§ GetScene()

ScenePtr GetScene ( ) const
inherited

Get the scene this camera is in.

Returns
Pointer to scene containing this camera

§ GetSceneNode()

Ogre::SceneNode* GetSceneNode ( ) const
inherited

Get the camera's scene node.

Returns
The scene node the camera is attached to
Deprecated:
See SceneNode()

§ GetScopedName()

std::string GetScopedName ( ) const
inherited

Get the camera's scoped name (scene_name::camera_name)

Returns
The name of the camera
Deprecated:
See ScopedName()

§ GetScreenshotPath()

std::string GetScreenshotPath ( ) const
inherited

Get the path to saved screenshots.

Returns
Path to saved screenshots.
Deprecated:
See ScreenshotPath()

§ GetTextureHeight()

unsigned int GetTextureHeight ( ) const
inherited

Get the height of the off-screen render texture.

Returns
Render texture height
Deprecated:
See TextureHeight()

§ GetTextureWidth()

unsigned int GetTextureWidth ( ) const
inherited

Get the width of the off-screen render texture.

Returns
Render texture width
Deprecated:
See TextureWidth()

§ GetTriangleCount()

virtual unsigned int GetTriangleCount ( ) const
virtualinherited

Get the triangle count.

Returns
The current triangle count
Deprecated:
See TriangleCount()

§ GetUp()

math::Vector3 GetUp ( )
inherited

Get the viewport up vector.

Returns
The viewport up vector
Deprecated:
See function that returns an ignition::math object.
See also
Up

§ GetVFOV()

math::Angle GetVFOV ( ) const
inherited

Get the camera FOV (vertical)

Returns
The vertical field of view
Deprecated:
See function that returns an ignition::math object.
See also
VFOV

§ GetViewport()

Ogre::Viewport* GetViewport ( ) const
inherited

Get a pointer to the Ogre::Viewport.

Returns
Pointer to the Ogre::Viewport
Deprecated:
See OgreViewport()

§ GetViewportHeight()

unsigned int GetViewportHeight ( ) const
inherited

Get the viewport height in pixels.

Returns
The viewport height
Deprecated:
See ViewportHeight()

§ GetViewportWidth()

unsigned int GetViewportWidth ( ) const
inherited

Get the viewport width in pixels.

Returns
The viewport width
Deprecated:
See ViewportWidth()

§ GetWindowId()

unsigned int GetWindowId ( ) const
inherited

Get the ID of the window this camera is rendering into.

Returns
The ID of the window.
Deprecated:
See WindowId()

§ GetWorldPointOnPlane()

bool GetWorldPointOnPlane ( int  _x,
int  _y,
const math::Plane _plane,
math::Vector3 _result 
)
inherited

Get point on a plane.

Parameters
[in]_xX cooridnate in camera's viewport, in pixels
[in]_yY cooridnate in camera's viewport, in pixels
[in]_planePlane on which to find the intersecting point
[out]_resultPoint on the plane
Returns
True if a valid point was found
Deprecated:
See function that accepts ignition::math parameters.
See also
WorldPointOnPlane

§ GetWorldPose()

math::Pose GetWorldPose ( ) const
inherited

Get the world pose.

Returns
The pose of the camera in the world coordinate frame.
Deprecated:
See function that returns an ignition::math object
See also
WorldPose

§ GetWorldPosition()

math::Vector3 GetWorldPosition ( ) const
inherited

Get the camera position in the world.

Returns
The world position of the camera
Deprecated:
See function that returns an ignition::math object
See also
WorldPosition

§ GetWorldRotation()

math::Quaternion GetWorldRotation ( ) const
inherited

Get the camera's orientation in the world.

Returns
The camera's orientation as a math::Quaternion
Deprecated:
See function that returns an ignition::math object
See also
WorldRotation

§ GetZValue()

double GetZValue ( int  _x,
int  _y 
)
inherited

Get the Z-buffer value at the given image coordinate.

Parameters
[in]_xImage coordinate; (0, 0) specifies the top-left corner.
[in]_yImage coordinate; (0, 0) specifies the top-left corner.
Returns
Image z value; note that this is abitrarily scaled and is not the same as the depth value.
Deprecated:
See ZValue()

§ HFOV()

ignition::math::Angle HFOV ( ) const
inherited

Get the camera FOV (horizontal)

Returns
The horizontal field of view

§ ImageByteSize() [1/2]

size_t ImageByteSize ( ) const
inherited

Get the image size in bytes.

Returns
Size in bytes

§ ImageByteSize() [2/2]

static size_t ImageByteSize ( const unsigned int  _width,
const unsigned int  _height,
const std::string &  _format 
)
staticinherited

Calculate image byte size base on a few parameters.

Parameters
[in]_widthWidth of an image
[in]_heightHeight of an image
[in]_formatImage format
Returns
Size of an image based on the parameters

§ ImageData()

virtual const unsigned char* ImageData ( const unsigned int  i = 0) const
virtualinherited

Get a pointer to the image data.

Get the raw image data from a camera's buffer.

Parameters
[in]_iIndex of the camera's texture (0 = RGB, 1 = depth).
Returns
Pointer to the raw data, null if data is not available.

§ ImageDepth()

unsigned int ImageDepth ( ) const
inherited

Get the depth of the image.

Returns
Depth of the image

§ ImageFormat()

std::string ImageFormat ( ) const
inherited

Get the string representation of the image format.

Returns
String representation of the image format.

§ ImageHeight()

virtual unsigned int ImageHeight ( ) const
virtualinherited

Get the height of the image.

Returns
Image height

§ ImageWidth()

virtual unsigned int ImageWidth ( ) const
virtualinherited

Get the width of the image.

Returns
Image width

§ Init()

void Init ( )
virtual

Initialize.

Reimplemented from Camera.

§ Initialized()

bool Initialized ( ) const
inherited

Return true if the camera has been initialized.

Returns
True if initialized was successful

§ IsAnimating()

bool IsAnimating ( ) const
inherited

Return true if the camera is moving due to an animation.

§ IsVisible() [1/2]

bool IsVisible ( VisualPtr  _visual)
inherited

Return true if the visual is within the camera's view frustum.

Parameters
[in]_visualThe visual to check for visibility
Returns
True if the _visual is in the camera's frustum

§ IsVisible() [2/2]

bool IsVisible ( const std::string &  _visualName)
inherited

Return true if the visual is within the camera's view frustum.

Parameters
[in]_visualNameName of the visual to check for visibility
Returns
True if the _visual is in the camera's frustum

§ LastRenderWallTime()

common::Time LastRenderWallTime ( ) const
inherited

Get the last time the camera was rendered.

Returns
Time the camera was last rendered

§ LensDistortion()

DistortionPtr LensDistortion ( ) const
inherited

Get the distortion model of this camera.

Returns
Distortion model.

§ Load() [1/2]

void Load ( sdf::ElementPtr  _sdf)
virtual

Load the user camera.

Parameters
[in]_sdfParameters for the camera.

Reimplemented from Camera.

§ Load() [2/2]

void Load ( )
virtual

Generic load function.

Reimplemented from Camera.

§ MoveToPosition() [1/2]

virtual bool MoveToPosition ( const math::Pose _pose,
double  _time 
)
virtual

Move the camera to a position (this is an animated motion).

See also
Camera::MoveToPositions
Parameters
[in]_poseEnd position of the camera
[in]_timeDuration of the camera's movement
Deprecated:
See function that accepts ignition::math parameters.

Reimplemented from Camera.

§ MoveToPosition() [2/2]

virtual bool MoveToPosition ( const ignition::math::Pose3d &  _pose,
const double  _time 
)
virtualinherited

Move the camera to a position (this is an animated motion).

See also
Camera::MoveToPositions
Parameters
[in]_poseEnd position of the camera
[in]_timeDuration of the camera's movement

§ MoveToPositions() [1/2]

bool MoveToPositions ( const std::vector< math::Pose > &  _pts,
double  _time,
std::function< void()>  _onComplete = NULL 
)
inherited

Move the camera to a series of poses (this is an animated motion).

See also
Camera::MoveToPosition
Parameters
[in]_ptsVector of poses to move to
[in]_timeDuration of the entire move
[in]_onCompleteCallback that is called when the move is complete
Deprecated:
See function that accepts ignition::math parameters.

§ MoveToPositions() [2/2]

bool MoveToPositions ( const std::vector< ignition::math::Pose3d > &  _pts,
const double  _time,
std::function< void()>  _onComplete = NULL 
)
inherited

Move the camera to a series of poses (this is an animated motion).

See also
Camera::MoveToPosition
Parameters
[in]_ptsVector of poses to move to
[in]_timeDuration of the entire move
[in]_onCompleteCallback that is called when the move is complete

§ MoveToVisual() [1/2]

void MoveToVisual ( VisualPtr  _visual)

Move the camera to focus on a visual.

Parameters
[in]_visualVisual to move the camera to.

§ MoveToVisual() [2/2]

void MoveToVisual ( const std::string &  _visualName)

Move the camera to focus on a visual.

Parameters
[in]_visualNameName of the visual to move the camera to.

§ Name()

std::string Name ( ) const
inherited

Get the camera's unscoped name.

Returns
The name of the camera

§ NearClip()

double NearClip ( ) const
inherited

Get the near clip distance.

Returns
Near clip distance

§ OgreCamera()

Ogre::Camera* OgreCamera ( ) const
inherited

Get a pointer to the ogre camera.

Returns
Pointer to the OGRE camera

§ OgreViewport()

Ogre::Viewport* OgreViewport ( ) const
inherited

Get a pointer to the Ogre::Viewport.

Returns
Pointer to the Ogre::Viewport

§ Pitch() [1/2]

void Pitch ( const math::Angle _angle,
Ogre::Node::TransformSpace  _relativeTo = Ogre::Node::TS_LOCAL 
)
inherited

Rotate the camera around the y-axis.

Parameters
[in]_anglePitch amount
[in]_relativeToCoordinate frame to rotate in. Valid values are Ogre::TS_LOCAL, Ogre::TS_PARENT, and Ogre::TS_WORLD. Default is Ogre::TS_LOCAL
Deprecated:
See function the accepts an ignition::math parameter

§ Pitch() [2/2]

void Pitch ( const ignition::math::Angle &  _angle,
ReferenceFrame  _relativeTo = RF_LOCAL 
)
inherited

Rotate the camera around the y-axis.

Parameters
[in]_anglePitch amount
[in]_relativeToCoordinate frame to rotate in. Valid values are RF_LOCAL, RF_PARENT, and RF_WORLD. Default is RF_LOCAL

§ PostRender()

virtual void PostRender ( )
virtual

Post render.

Reimplemented from Camera.

§ Project()

ignition::math::Vector2i Project ( const ignition::math::Vector3d &  _pt) const
inherited

Project 3D world coordinates to 2D screen coordinates.

Parameters
[in]_pt3D world coodinates
Returns
_pt 2D screen coordinates

§ ProjectionMatrix()

ignition::math::Matrix4d ProjectionMatrix ( ) const
inherited

Return the projection matrix of this camera.

Returns
the projection matrix

§ ProjectionType()

std::string ProjectionType ( ) const
inherited

Return the projection type as a string.

Returns
"perspective" or "orthographic"
See also
SetProjectionType(const std::string &_type)

§ ReadPixelBuffer()

void ReadPixelBuffer ( )
protectedinherited

Read image data from pixel buffer.

§ Ready()

bool Ready ( )

Used to check if Oculus is plugged in and can be used.

Returns
True when Oculus is ready to use.

§ Render()

void Render ( const bool  _force = false)
inherited

Render the camera.

Called after the pre-render signal. This function will generate camera images.

Parameters
[in]_forceForce camera to render. Ignore camera update rate.

§ RenderImpl()

virtual void RenderImpl ( )
protectedvirtual

Implementation of the render call.

Reimplemented from Camera.

§ RenderRate()

double RenderRate ( ) const
inherited

Get the render Hz rate.

Returns
The Hz rate

§ RenderTexture()

Ogre::Texture* RenderTexture ( ) const
inherited

Get the render texture.

Returns
Pointer to the render texture

§ ResetSensor()

void ResetSensor ( )

Reset the Oculus Rift sensor orientation.

§ Resize()

void Resize ( unsigned int  _w,
unsigned int  _h 
)

Resize the camera.

Parameters
[in]_wWidth of the camera image.
[in]_hHeight of the camera image.

§ Right()

ignition::math::Vector3d Right ( ) const
inherited

Get the viewport right vector.

Returns
The viewport right vector

§ Roll() [1/2]

void Roll ( const math::Angle _angle,
Ogre::Node::TransformSpace  _relativeTo = Ogre::Node::TS_LOCAL 
)
inherited

Rotate the camera around the x-axis.

Parameters
[in]_angleRotation amount
[in]_relativeToCoordinate frame to rotate in. Valid values are Ogre::TS_LOCAL, Ogre::TS_PARENT, and Ogre::TS_WORLD. Default is Ogre::TS_LOCAL
Deprecated:
See function the accepts an ignition::math parameter

§ Roll() [2/2]

void Roll ( const ignition::math::Angle &  _angle,
ReferenceFrame  _relativeTo = RF_LOCAL 
)
inherited

Rotate the camera around the x-axis.

Parameters
[in]_angleRotation amount
[in]_relativeToCoordinate frame to rotate in. Valid values are RF_LOCAL, RF_PARENT, and RF_WORLD. Default is RF_LOCAL

§ SaveFrame() [1/2]

bool SaveFrame ( const std::string &  _filename)
inherited

Save the last frame to disk.

Parameters
[in]_filenameFile in which to save a single frame
Returns
True if saving was successful

§ SaveFrame() [2/2]

static bool SaveFrame ( const unsigned char *  _image,
const unsigned int  _width,
const unsigned int  _height,
const int  _depth,
const std::string &  _format,
const std::string &  _filename 
)
staticinherited

Save a frame using an image buffer.

Parameters
[in]_imageThe raw image buffer
[in]_widthWidth of the image
[in]_heightHeight of the image
[in]_depthDepth of the image data
[in]_formatFormat the image data is in
[in]_filenameName of the file in which to write the frame
Returns
True if saving was successful

§ SceneNode()

Ogre::SceneNode* SceneNode ( ) const
inherited

Get the camera's scene node.

Returns
The scene node the camera is attached to

§ ScopedName()

std::string ScopedName ( ) const
inherited

Get the camera's scoped name (scene_name::camera_name)

Returns
The name of the camera

§ ScreenshotPath()

std::string ScreenshotPath ( ) const
inherited

Get the path to saved screenshots.

Returns
Path to saved screenshots.

§ SetAspectRatio()

void SetAspectRatio ( float  _ratio)
inherited

Set the aspect ratio.

Parameters
[in]_ratioThe aspect ratio (width / height) in pixels

§ SetCaptureData()

void SetCaptureData ( const bool  _value)
inherited

Set whether to capture data.

Parameters
[in]_valueSet to true to capture data into a memory buffer.

§ SetCaptureDataOnce()

void SetCaptureDataOnce ( )
inherited

Capture data once and save to disk.

§ SetClipDist()

virtual void SetClipDist ( const float  _near,
const float  _far 
)
virtualinherited

Set the clip distances.

Parameters
[in]_nearNear clip distance in meters
[in]_farFar clip distance in meters

Reimplemented in UserCamera.

§ SetHFOV() [1/2]

void SetHFOV ( math::Angle  _angle)
inherited

Set the camera FOV (horizontal)

Parameters
[in]_angleHorizontal field of view
Deprecated:
See function the accepts an ignition::math parameter

§ SetHFOV() [2/2]

void SetHFOV ( const ignition::math::Angle &  _angle)
inherited

Set the camera FOV (horizontal)

Parameters
[in]_angleHorizontal field of view

§ SetImageHeight()

void SetImageHeight ( const unsigned int  _h)
inherited

Set the image height.

Parameters
[in]_hImage height

§ SetImageSize()

void SetImageSize ( const unsigned int  _w,
const unsigned int  _h 
)
inherited

Set the image size.

Parameters
[in]_wImage width
[in]_hImage height

§ SetImageWidth()

void SetImageWidth ( const unsigned int  _w)
inherited

Set the image height.

Parameters
[in]_wImage width

§ SetName()

void SetName ( const std::string &  _name)
inherited

Set the camera's name.

Parameters
[in]_nameNew name for the camera

§ SetProjectionType()

virtual bool SetProjectionType ( const std::string &  _type)
virtualinherited

Set the type of projection used by the camera.

Parameters
[in]_typeThe type of projection: "perspective" or "orthographic".
Returns
True if successful.
See also
GetProjectionType()

Reimplemented in UserCamera.

§ SetRenderRate()

void SetRenderRate ( const double  _hz)
inherited

Set the render Hz rate.

Parameters
[in]_hzThe Hz rate

§ SetRenderTarget()

virtual void SetRenderTarget ( Ogre::RenderTarget *  _target)
virtual

Set to true to enable rendering.

Use this only if you really know what you're doing.

Parameters
[in]_targetThe new rendering target.

Reimplemented from Camera.

§ SetSaveFramePathname()

void SetSaveFramePathname ( const std::string &  _pathname)
inherited

Set the save frame pathname.

Parameters
[in]_pathnameDirectory in which to store saved image frames

§ SetScene()

void SetScene ( ScenePtr  _scene)
inherited

Set the scene this camera is viewing.

Parameters
[in]_scenePointer to the scene

§ SetSceneNode()

void SetSceneNode ( Ogre::SceneNode *  _node)
inherited

Set the camera's scene node.

Parameters
[in]_nodeThe scene nodes to attach the camera to

§ SetWindowId()

void SetWindowId ( unsigned int  _windowId)
inherited

§ SetWorldPose() [1/2]

virtual void SetWorldPose ( const math::Pose _pose)
virtualinherited

Set the global pose of the camera.

Parameters
[in]_poseThe new math::Pose of the camera
Deprecated:
See function that accepts an ignition::math parameter.

Reimplemented in UserCamera.

§ SetWorldPose() [2/2]

virtual void SetWorldPose ( const ignition::math::Pose3d &  _pose)
virtualinherited

Set the global pose of the camera.

Parameters
[in]_poseThe new ignition::math::Pose3d of the camera

§ SetWorldPosition() [1/2]

void SetWorldPosition ( const math::Vector3 _pos)
inherited

Set the world position.

Parameters
[in]_posThe new position of the camera
Deprecated:
See function that accepts an ignition::math parameter

§ SetWorldPosition() [2/2]

void SetWorldPosition ( const ignition::math::Vector3d &  _pos)
inherited

Set the world position.

Parameters
[in]_posThe new position of the camera

§ SetWorldRotation() [1/2]

void SetWorldRotation ( const math::Quaternion _quat)
inherited

Set the world orientation.

Parameters
[in]_quatThe new orientation of the camera
Deprecated:
See function that accepts an ignition::math parameter

§ SetWorldRotation() [2/2]

void SetWorldRotation ( const ignition::math::Quaterniond &  _quat)
inherited

Set the world orientation.

Parameters
[in]_quatThe new orientation of the camera

§ ShowWireframe()

void ShowWireframe ( const bool  _s)
inherited

Set whether to view the world in wireframe.

Parameters
[in]_sSet to True to render objects as wireframe

§ TextureHeight()

unsigned int TextureHeight ( ) const
inherited

Get the height of the off-screen render texture.

Returns
Render texture height

§ TextureWidth()

unsigned int TextureWidth ( ) const
inherited

Get the width of the off-screen render texture.

Returns
Render texture width

§ ToggleShowWireframe()

void ToggleShowWireframe ( )
inherited

Toggle whether to view the world in wireframe.

§ TrackVisual()

void TrackVisual ( const std::string &  _visualName)
inherited

Set the camera to track a scene node.

Parameters
[in]_visualNameName of the visual to track

§ TrackVisualImpl() [1/2]

virtual bool TrackVisualImpl ( VisualPtr  _visual)
protectedvirtual

Set the camera to track a scene node.

Tracking just causes the camera to rotate to follow the visual.

Parameters
[in]_visualVisual to track.
Returns
True if the camera is now tracking the visual.

Reimplemented from Camera.

§ TrackVisualImpl() [2/2]

bool TrackVisualImpl ( const std::string &  _visualName)
protectedinherited

Implementation of the Camera::TrackVisual call.

Parameters
[in]_visualNameName of the visual to track
Returns
True if able to track the visual

§ Translate() [1/2]

void Translate ( const math::Vector3 _direction)
inherited

Translate the camera.

Parameters
[in]_directionThe translation vector
Deprecated:
See function that accepts an ignition::math parameter

§ Translate() [2/2]

void Translate ( const ignition::math::Vector3d &  _direction)
inherited

Translate the camera.

Parameters
[in]_directionThe translation vector

§ TriangleCount()

virtual unsigned int TriangleCount ( ) const
virtualinherited

Get the triangle count.

Returns
The current triangle count

§ Up()

ignition::math::Vector3d Up ( ) const
inherited

Get the viewport up vector.

Returns
The viewport up vector

§ Update()

virtual void Update ( )
virtual

Render the camera.

Reimplemented from Camera.

§ UpdateFOV()

virtual void UpdateFOV ( )
protectedvirtualinherited

Update the camera's field of view.

Reimplemented in UserCamera.

§ VFOV()

ignition::math::Angle VFOV ( ) const
inherited

Get the camera FOV (vertical)

Returns
The vertical field of view
Deprecated:
See function that returns an ignition::math object.
See also
VFOV

§ ViewportHeight()

unsigned int ViewportHeight ( ) const
inherited

Get the viewport height in pixels.

Returns
The viewport height

§ ViewportWidth()

unsigned int ViewportWidth ( ) const
inherited

Get the viewport width in pixels.

Returns
The viewport width

§ WindowId()

unsigned int WindowId ( ) const
inherited

Get the ID of the window this camera is rendering into.

Returns
The ID of the window.

§ WorldPointOnPlane()

bool WorldPointOnPlane ( const int  _x,
const int  _y,
const ignition::math::Planed &  _plane,
ignition::math::Vector3d &  _result 
)
inherited

Get point on a plane.

Parameters
[in]_xX coordinate in camera's viewport, in pixels
[in]_yY coordinate in camera's viewport, in pixels
[in]_planePlane on which to find the intersecting point
[out]_resultPoint on the plane
Returns
True if a valid point was found

§ WorldPose()

ignition::math::Pose3d WorldPose ( ) const
inherited

Get the world pose.

Returns
The pose of the camera in the world coordinate frame.

§ WorldPosition()

ignition::math::Vector3d WorldPosition ( ) const
inherited

Get the camera position in the world.

Returns
The world position of the camera

§ WorldRotation()

ignition::math::Quaterniond WorldRotation ( ) const
inherited

Get the camera's orientation in the world.

Returns
The camera's orientation as an ignition::math::Quaterniond

§ Yaw() [1/2]

void Yaw ( const math::Angle _angle,
Ogre::Node::TransformSpace  _relativeTo = Ogre::Node::TS_WORLD 
)
inherited

Rotate the camera around the z-axis.

Parameters
[in]_angleRotation amount
[in]_relativeToCoordinate frame to rotate in. Valid values are Ogre::TS_LOCAL, Ogre::TS_PARENT, and Ogre::TS_WORLD. Default is Ogre::TS_WORLD
Deprecated:
See function the accepts an ignition::math parameter

§ Yaw() [2/2]

void Yaw ( const ignition::math::Angle &  _angle,
ReferenceFrame  _relativeTo = RF_WORLD 
)
inherited

Rotate the camera around the z-axis.

Parameters
[in]_angleRotation amount
[in]_relativeToCoordinate frame to rotate in. Valid values are RF_LOCAL, RF_PARENT, and RF_WORLD. Default is RF_WORLD

§ ZValue()

double ZValue ( const int  _x,
const int  _y 
)
inherited

Get the Z-buffer value at the given image coordinate.

Parameters
[in]_xImage coordinate; (0, 0) specifies the top-left corner.
[in]_yImage coordinate; (0, 0) specifies the top-left corner.
Returns
Image z value; note that this is abitrarily scaled and is not the same as the depth value.

Member Data Documentation

§ animState

Ogre::AnimationState* animState
protectedinherited

Animation state, used to animate the camera.

§ bayerFrameBuffer

unsigned char* bayerFrameBuffer
protectedinherited

Buffer for a bayer image frame.

§ camera

Ogre::Camera* camera
protectedinherited

The OGRE camera.

§ captureData

bool captureData
protectedinherited

True to capture frames into an image buffer.

§ captureDataOnce

bool captureDataOnce
protectedinherited

True to capture a frame once and save to disk.

§ connections

std::vector<event::ConnectionPtr> connections
protectedinherited

The camera's event connections.

§ imageFormat

int imageFormat
protectedinherited

Format for saving images.

§ imageHeight

int imageHeight
protectedinherited

Save image height.

§ imageWidth

int imageWidth
protectedinherited

Save image width.

§ initialized

bool initialized
protectedinherited

True if initialized.

§ lastRenderWallTime

common::Time lastRenderWallTime
protectedinherited

Time the last frame was rendered.

§ name

std::string name
protectedinherited

Name of the camera.

§ newData

bool newData
protectedinherited

True if new data is available.

§ newImageFrame

event::EventT<void(const unsigned char *, unsigned int, unsigned int, unsigned int, const std::string &)> newImageFrame
protectedinherited

Event triggered when a new frame is generated.

§ onAnimationComplete

std::function<void()> onAnimationComplete
protectedinherited

User callback for when an animation completes.

§ prevAnimTime

common::Time prevAnimTime
protectedinherited

Previous time the camera animation was updated.

§ renderTarget

Ogre::RenderTarget* renderTarget
protectedinherited

Target that renders frames.

§ renderTexture

Ogre::Texture* renderTexture
protectedinherited

Texture that receives results from rendering.

§ requests

std::list<msgs::Request> requests
protectedinherited

List of requests.

§ saveCount

unsigned int saveCount
protectedinherited

Number of saved frames.

§ saveFrameBuffer

unsigned char* saveFrameBuffer
protectedinherited

Buffer for a single image frame.

§ scene

ScenePtr scene
protectedinherited

Pointer to the scene.

§ sceneNode

Ogre::SceneNode* sceneNode
protectedinherited

Scene node that controls camera position and orientation.

§ scopedName

std::string scopedName
protectedinherited

Scene scoped name of the camera.

§ scopedUniqueName

std::string scopedUniqueName
protectedinherited

Scene scoped name of the camera with a unique ID.

§ screenshotPath

std::string screenshotPath
protectedinherited

Path to saved screenshots.

§ sdf

sdf::ElementPtr sdf
protectedinherited

Camera's SDF values.

§ textureHeight

unsigned int textureHeight
protectedinherited

Height of the render texture.

§ textureWidth

unsigned int textureWidth
protectedinherited

Width of the render texture.

§ viewport

Ogre::Viewport* viewport
protectedinherited

Viewport the ogre camera uses.

§ windowId

unsigned int windowId
protectedinherited

ID of the window that the camera is attached to.


The documentation for this class was generated from the following file: