Public Member Functions | Protected Attributes
vgui_camera Class Reference

Projects 3D models into a GL context given a camera projection matrix. More...

#include <vgui_camera.h>

List of all members.

Public Member Functions

 vgui_camera ()
 Constructor - create a camera with a default projection matrix.
 vgui_camera (vnl_matrix_fixed< double, 3, 4 > const &P)
 Constructor - create a camera with the given projection matrix.
void set_pmatrix (vnl_matrix_fixed< double, 3, 4 > const &m)
 Set the projection matrix to the given matrix.
vnl_matrix_fixed< double, 3, 4 > get_glprojmatrix (const int imagesizex=720, const int imagesizey=576) const
 Plug this matrix into a vgui_loader_tableau.

Protected Attributes

vnl_matrix_fixed< double, 3, 4 > pmatrix
 The projection matrix.

Detailed Description

Projects 3D models into a GL context given a camera projection matrix.

vgui_camera is a utility class which allows 3D models to projected into a GL context given a known camera projection matrix. Note comments in code about clipping planes which is really rather important if you care about such things. Use the class in conjunction with a vgui_load (if you dare), or a vgui_mult to change the GL_PROJECTION_MATRIX appropriately.

Definition at line 29 of file vgui_camera.h.


Constructor & Destructor Documentation

vgui_camera::vgui_camera ( ) [inline]

Constructor - create a camera with a default projection matrix.

Definition at line 33 of file vgui_camera.h.

vgui_camera::vgui_camera ( vnl_matrix_fixed< double, 3, 4 > const &  P) [inline]

Constructor - create a camera with the given projection matrix.

Definition at line 36 of file vgui_camera.h.


Member Function Documentation

vnl_matrix_fixed< double, 3, 4 > vgui_camera::get_glprojmatrix ( const int  imagesizex = 720,
const int  imagesizey = 576 
) const

Plug this matrix into a vgui_loader_tableau.

Note: this will return a GL_PROJECTION_MATRIX with the assumption that you have a Euclidean reconstruction. The result is that the front and back clipping planes will be PARALLEL (note: not projective frame!) to the image plane.

Definition at line 21 of file vgui_camera.cxx.

void vgui_camera::set_pmatrix ( vnl_matrix_fixed< double, 3, 4 > const &  m) [inline]

Set the projection matrix to the given matrix.

Definition at line 39 of file vgui_camera.h.


Member Data Documentation

vnl_matrix_fixed<double,3,4> vgui_camera::pmatrix [protected]

The projection matrix.

Definition at line 51 of file vgui_camera.h.


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