CameraSensor Class Reference
[Sensors, Camera]
#include <CameraSensor.hh>
Inheritance diagram for CameraSensor:

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) | |
| Constructor. | |
| virtual | ~CameraSensor () |
| Destructor. | |
| Pose3d | GetWorldPose () const |
| Get the global pose of the camera. | |
| virtual std::string | GetMaterialName () const=0 |
| 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. | |
| 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. | |
| size_t | GetImageByteSize () const |
| Get the image size in bytes. | |
| virtual const unsigned char * | GetImageData (unsigned int i=0)=0 |
| double | GetZValue (int x, int y) |
| Get the Z-buffer value at the given image coordinate. | |
| double | GetNearClip () |
| Get the near clip distance. | |
| double | GetFarClip () |
| Get the far clip distance. | |
| 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. | |
Protected Member Functions | |
| virtual void | LoadChild (XMLConfigNode *node) |
| Load the camera using parameter from an XMLConfig node. | |
| virtual void | InitChild () |
| Initialize the camera. | |
| virtual void | UpdateChild (UpdateParams ¶ms) |
| Update the sensor information. | |
| virtual void | FiniChild () |
| Finalize the camera. | |
| virtual void | SaveFrame ()=0 |
Protected Attributes | |
| double | hfov |
| double | nearClip |
| double | farClip |
| unsigned int | imageWidth |
| unsigned int | imageHeight |
| unsigned int | textureWidth |
| unsigned int | textureHeight |
| Ogre::Camera * | camera |
| Ogre::SceneNode * | pitchNode |
| Pose3d | pose |
| Ogre::SceneNode * | sceneNode |
| unsigned char * | saveFrameBuffer |
| unsigned int | saveCount |
| bool | saveFrames |
| std::string | savePathname |
| unsigned int | visibilityMask |
Member Function Documentation
| virtual void LoadChild | ( | XMLConfigNode * | node | ) | [protected, virtual] |
Load the camera using parameter from an XMLConfig node.
- Parameters:
-
node The XMLConfig node
Reimplemented from Sensor.
Reimplemented in MonoCameraSensor, and StereoCameraSensor.
| double GetZValue | ( | int | x, | |
| int | y | |||
| ) |
Get the Z-buffer value at the given image coordinate.
- Parameters:
-
x,y Image 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.
The documentation for this class was generated from the following file: