Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Stg::ModelCamera Class Reference

ModelCamera class More...

#include <stage.hh>

Inheritance diagram for Stg::ModelCamera:
Inheritance graph
[legend]

List of all members.

Classes

struct  ColoredVertex

Public Member Functions

virtual void DataVisualize (Camera *cam)
 Draw Camera Model - TODO.
const GLubyte * FrameColor () const
 get a reference to camera color image. 4 bytes (RGBA) per pixel
const GLfloat * FrameDepth () const
 get a reference to camera depth buffer
const PerspectiveCameragetCamera (void) const
 get reference to camera used
int getHeight (void) const
 height of captured image
int getWidth (void) const
 width of captured image
virtual void Load ()
 ModelCamera (World *world, Model *parent, const std::string &type)
void setPitch (double pitch)
 change the pitch
void setYaw (double yaw)
 change the yaw
virtual void Update ()
 Capture a new frame ( calls GetFrame )
 ~ModelCamera ()

Private Member Functions

bool GetFrame ()
 Take a screenshot from the camera's perspective. return: true for sucess, and data is available via FrameDepth() / FrameColor()

Private Attributes

PerspectiveCamera _camera
GLubyte * _camera_colors
GLfloat * _camera_quads
int _camera_quads_size
Canvas_canvas
GLubyte * _frame_color_data
GLfloat * _frame_data
int _height
double _pitch_offset
bool _valid_vertexbuf_cache
ColoredVertex_vertexbuf_cache
int _width
double _yaw_offset

Static Private Attributes

static const int _depth = 4
static Option showCameraData

Detailed Description

ModelCamera class

Definition at line 2849 of file stage.hh.


Constructor & Destructor Documentation

ModelCamera::ModelCamera ( World world,
Model parent,
const std::string &  type 
)

Definition at line 87 of file model_camera.cc.

Definition at line 131 of file model_camera.cc.


Member Function Documentation

void ModelCamera::DataVisualize ( Camera cam) [virtual]

Draw Camera Model - TODO.

Draw camera visualization

Reimplemented from Stg::Model.

Definition at line 244 of file model_camera.cc.

const GLubyte* Stg::ModelCamera::FrameColor ( ) const [inline]

get a reference to camera color image. 4 bytes (RGBA) per pixel

Definition at line 2915 of file stage.hh.

const GLfloat* Stg::ModelCamera::FrameDepth ( ) const [inline]

get a reference to camera depth buffer

Definition at line 2912 of file stage.hh.

const PerspectiveCamera& Stg::ModelCamera::getCamera ( void  ) const [inline]

get reference to camera used

Definition at line 2909 of file stage.hh.

bool ModelCamera::GetFrame ( void  ) [private]

Take a screenshot from the camera's perspective. return: true for sucess, and data is available via FrameDepth() / FrameColor()

Definition at line 170 of file model_camera.cc.

int Stg::ModelCamera::getHeight ( void  ) const [inline]

height of captured image

Definition at line 2906 of file stage.hh.

int Stg::ModelCamera::getWidth ( void  ) const [inline]

width of captured image

Definition at line 2903 of file stage.hh.

void ModelCamera::Load ( void  ) [virtual]

configure a model by reading from the current world file

Reimplemented from Stg::Model.

Definition at line 143 of file model_camera.cc.

void Stg::ModelCamera::setPitch ( double  pitch) [inline]

change the pitch

Definition at line 2918 of file stage.hh.

void Stg::ModelCamera::setYaw ( double  yaw) [inline]

change the yaw

Definition at line 2921 of file stage.hh.

void ModelCamera::Update ( void  ) [virtual]

Capture a new frame ( calls GetFrame )

Reimplemented from Stg::Model.

Definition at line 164 of file model_camera.cc.


Member Data Documentation

Definition at line 2877 of file stage.hh.

Definition at line 2873 of file stage.hh.

GLfloat* Stg::ModelCamera::_camera_quads [private]

Definition at line 2872 of file stage.hh.

Definition at line 2871 of file stage.hh.

Definition at line 2859 of file stage.hh.

const int Stg::ModelCamera::_depth = 4 [static, private]

Definition at line 2869 of file stage.hh.

Definition at line 2862 of file stage.hh.

GLfloat* Stg::ModelCamera::_frame_data [private]

Definition at line 2861 of file stage.hh.

Definition at line 2868 of file stage.hh.

Definition at line 2879 of file stage.hh.

Definition at line 2864 of file stage.hh.

Definition at line 2865 of file stage.hh.

int Stg::ModelCamera::_width [private]

Definition at line 2867 of file stage.hh.

Definition at line 2878 of file stage.hh.

Definition at line 2875 of file stage.hh.


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


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Thu Aug 27 2015 15:20:57