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

camera.cpp

Go to the documentation of this file.
00001 #include <windows.h>
00002 #include "camera.h"
00003 #include "shared.h"
00004 
00005 CAMERA::CAMERA()
00006 {
00007 }
00008 
00009 CAMERA::~CAMERA()
00010 {
00011 }
00012 
00013 void CAMERA::Reset()
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 }
00022 
00023 void CAMERA::Update()
00024 {
00025     Rotate();
00026 
00027     UpdatePosition();
00028 }
00029 
00030 void CAMERA::Apply()
00031 {
00032     Matrix.QuatToMatrix(Orientation);
00033     Matrix.MatrixInverse();
00034 
00035     glLoadMatrixf(Matrix.Element);
00036     glTranslatef(-Position.x,-Position.y,-Position.z);
00037 }

Generated on Fri Dec 23 05:21:20 2005 for Skybox by doxygen1.2.15