Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CAMERA Class Reference

#include <camera.h>

Inheritance diagram for CAMERA:

OBJECT List of all members.

Public Methods

 CAMERA ()
 ~CAMERA ()
void Reset ()
void Update ()
void Apply ()

Public Attributes

MATRIX Matrix

Constructor & Destructor Documentation

CAMERA::CAMERA  
 

Definition at line 5 of file camera.cpp.

00006 {
00007 }

CAMERA::~CAMERA  
 

Definition at line 9 of file camera.cpp.

00010 {
00011 }


Member Function Documentation

void CAMERA::Apply  
 

Definition at line 30 of file camera.cpp.

References MATRIX::Element, Matrix, MATRIX::MatrixInverse(), OBJECT::Orientation, OBJECT::Position, MATRIX::QuatToMatrix(), VECTOR::x, VECTOR::y, and VECTOR::z.

00031 {
00032     Matrix.QuatToMatrix(Orientation);
00033     Matrix.MatrixInverse();
00034 
00035     glLoadMatrixf(Matrix.Element);
00036     glTranslatef(-Position.x,-Position.y,-Position.z);
00037 }

void CAMERA::Reset  
 

Reimplemented from OBJECT.

Definition at line 13 of file camera.cpp.

References OBJECT::Delta_x, OBJECT::Delta_y, OBJECT::Delta_z, MATRIX::LoadIdentity(), Matrix, OBJECT::Orientation, OBJECT::Position, VECTOR::Reset(), and QUAT::Reset().

Referenced by SetGLCamera().

00014 {
00015     Orientation.Reset();
00016     Position.Reset();
00017         Delta_x = 0.0;
00018         Delta_y = 0.0;
00019         Delta_z = 0.0;
00020         Matrix.LoadIdentity();
00021 }

void CAMERA::Update  
 

Definition at line 23 of file camera.cpp.

References OBJECT::Rotate(), and OBJECT::UpdatePosition().

00024 {
00025     Rotate();
00026 
00027     UpdatePosition();
00028 }


Member Data Documentation

MATRIX CAMERA::Matrix
 

Definition at line 19 of file camera.h.

Referenced by Apply(), and Reset().


The documentation for this class was generated from the following files:
Generated on Fri Dec 23 05:21:21 2005 for Skybox by doxygen1.2.15