Al's Programming Resource Homepage  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 
00003 
00004 #include "camera.h"
00005 #include "general.h"
00006 
00007 CAMERA::CAMERA()
00008 {
00009 }
00010 
00011 CAMERA::~CAMERA()
00012 {
00013 }
00014 
00015 void CAMERA::Set()
00016 {
00017     Orientation.Set();
00018     Position.Set();
00019         Delta_x = 0.0;
00020         Delta_y = 0.0;
00021         Delta_z = 0.0;
00022         Matrix.LoadIdentity();
00023 }
00024 
00025 void CAMERA::UpdateCamera()
00026 {
00027     Rotate();
00028 
00029     UpdatePosition();
00030 }
00031 
00032 void CAMERA::ApplyCamera()
00033 {
00034     Matrix.QuatToMatrix(Orientation);
00035     Matrix.MatrixInverse();
00036 
00037     glLoadMatrixf(Matrix.Element);
00038     glTranslatef(-Position.x,-Position.y,-Position.z);
00039 }

Generated on Fri Dec 23 05:19:34 2005 for OpenGL MDI 2 by doxygen1.2.15