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. 3 bytes (RGB) 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 (float pitch)
 change the pitch
void setYaw (float 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
float _pitch_offset
bool _valid_vertexbuf_cache
ColoredVertex_vertexbuf_cache
int _width
float _yaw_offset

Static Private Attributes

static const int _depth = 4
static Option showCameraData

Detailed Description

ModelCamera class

Definition at line 2722 of file stage.hh.


Constructor & Destructor Documentation

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

Member Function Documentation

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

Draw Camera Model - TODO.

Draw camera visualization

Reimplemented from Stg::Model.

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

get a reference to camera color image. 3 bytes (RGB) per pixel

Definition at line 2788 of file stage.hh.

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

get a reference to camera depth buffer

Definition at line 2785 of file stage.hh.

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

get reference to camera used

Definition at line 2782 of file stage.hh.

bool Stg::ModelCamera::GetFrame (  )  [private]

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

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

height of captured image

Definition at line 2779 of file stage.hh.

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

width of captured image

Definition at line 2776 of file stage.hh.

virtual void Stg::ModelCamera::Load (  )  [virtual]

configure a model by reading from the current world file

Reimplemented from Stg::Model.

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

change the pitch

Definition at line 2791 of file stage.hh.

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

change the yaw

Definition at line 2794 of file stage.hh.

virtual void Stg::ModelCamera::Update (  )  [virtual]

Capture a new frame ( calls GetFrame ).

Reimplemented from Stg::Model.


Member Data Documentation

Definition at line 2750 of file stage.hh.

Definition at line 2746 of file stage.hh.

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

Definition at line 2745 of file stage.hh.

Definition at line 2744 of file stage.hh.

Canvas* Stg::ModelCamera::_canvas [private]

Definition at line 2732 of file stage.hh.

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

Definition at line 2742 of file stage.hh.

Definition at line 2735 of file stage.hh.

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

Definition at line 2734 of file stage.hh.

Definition at line 2741 of file stage.hh.

Definition at line 2752 of file stage.hh.

Definition at line 2737 of file stage.hh.

Definition at line 2738 of file stage.hh.

int Stg::ModelCamera::_width [private]

Definition at line 2740 of file stage.hh.

Definition at line 2751 of file stage.hh.

Option Stg::ModelCamera::showCameraData [static, private]

Definition at line 2748 of file stage.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


stage
Author(s): Richard Vaughan, with contributions from many others. See web page for a full credits list.
autogenerated on Fri Jan 11 10:03:39 2013