CameraSensor Class Reference

#include <CameraSensor.hh>

Inheritance diagram for CameraSensor:

Sensor Entity

List of all members.

Detailed Description

Basic camera sensor This sensor is used for simulating standard monocular cameras; is is used by both camera models (e.g., SonyVID30) and user interface models (e.g., ObserverCam).

Public Member Functions

 CameraSensor (Body *body)
virtual ~CameraSensor ()
Pose3d GetWorldPose () const
std::string GetMaterialName () const
void Translate (const Vector3 &direction)
void RotateYaw (float angle)
void RotatePitch (float angle)
void SetFOV (double fov)
double GetFOV () const
unsigned int GetImageWidth () const
unsigned int GetTextureWidth () const
unsigned int GetImageHeight () const
unsigned int GetTextureHeight () const
const unsigned char * GetImageData ()
size_t GetImageByteSize () const
double GetZValue (int x, int y)
void EnableSaveFrame (bool enable)
void ToggleSaveFrame ()
Ogre::Camera * GetOgreCamera () const

Protected Member Functions

virtual void LoadChild (XMLConfigNode *node)
virtual void InitChild ()
virtual void UpdateChild (UpdateParams &params)
virtual void FiniChild ()
 Finalize the camera.

Constructor & Destructor Documentation

CameraSensor ( Body body  ) 


virtual ~CameraSensor (  )  [virtual]


Member Function Documentation

virtual void LoadChild ( XMLConfigNode node  )  [protected, virtual]

Load the camera using parameter from an XMLConfig node

node The XMLConfig node

Reimplemented from Sensor.

virtual void InitChild (  )  [protected, virtual]

Initialize the camera

Reimplemented from Sensor.

virtual void UpdateChild ( UpdateParams params  )  [protected, virtual]

Update the sensor information

Reimplemented from Sensor.

Pose3d GetWorldPose (  )  const

Get the global pose of the camera

std::string GetMaterialName (  )  const

Return the material the camera renders to

void Translate ( const Vector3 direction  ) 

Translate the camera

void RotateYaw ( float  angle  ) 

Rotate the camera around the yaw axis

void RotatePitch ( float  angle  ) 

Rotate the camera around the pitch axis

void SetFOV ( double  fov  ) 

Set the camera FOV (horizontal)

double GetFOV (  )  const

Get the camera FOV (horizontal)

unsigned int GetImageWidth (  )  const

Get the width of the image

unsigned int GetTextureWidth (  )  const

Get the width of the texture

unsigned int GetImageHeight (  )  const

Get the height of the image

unsigned int GetTextureHeight (  )  const

Get the height of the texture

const unsigned char* GetImageData (  ) 

Get a pointer to the image data

size_t GetImageByteSize (  )  const

Get the image size in bytes

double GetZValue ( int  x,
int  y 

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

x,y Image coordinate; (0, 0) specifies the top-left corner.
Image z value; note that this is abitrarily scaled and is not the same as the depth value.

void EnableSaveFrame ( bool  enable  ) 

Enable or disable saving

void ToggleSaveFrame (  ) 

Toggle saving of frames

Ogre::Camera* GetOgreCamera (  )  const

Get a pointer to the ogre camera

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

Last updated Aug 04 2007