00001
00002
00004
00005 #if !defined(AFX_TKAMERA_H__FEB98F91_DDD1_41B0_9C93_00BAD39B215A__INCLUDED_)
00006 #define AFX_TKAMERA_H__FEB98F91_DDD1_41B0_9C93_00BAD39B215A__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include "TGlFloatMatrix.h"
00013 #include "TKoo3d.h"
00014 #include "TStdPlane.h"
00015
00016
00018
00023 class TKamera
00024 {
00025 private:
00026 TGlFloatMatrix projMatrix;
00027 TGlFloatMatrix viewMatrix;
00028
00029 TKoo3d<GLfloat> viewDir;
00030 TKoo3d<GLfloat> pos;
00031 TKoo3d<GLfloat> upV;
00032
00033 double zprp;
00034 double zvp;
00035
00036 TStdPlane<GLfloat> backPlane;
00037 TStdPlane<GLfloat> sidePlane[2];
00038 TStdPlane<GLfloat> topPlane[2];
00039 public:
00040 TStdLine<float> getProjectedLine(float x, float y);
00041 TKoo3d<float> getPos();
00042 void setUpVector(TKoo3d<GLfloat>& v);
00043 void moveForw(float f);
00044 BOOLEAN checkTopPlanes(TKoo3d<float> k, float size);
00045 BOOLEAN checkSidePlanes(TKoo3d<float> k, float size);
00046 BOOLEAN isVisible(TKoo3d<float> k, float size);
00047 void calcClipPlanes();
00048 void setZoom(double dist);
00049 virtual void setDir(TKoo3d<GLfloat>& k);
00050 virtual void setPos(TKoo3d<GLfloat>& k);
00051 virtual void recalcView();
00052 TKamera();
00053
00054 virtual void set();
00055 virtual void recalcProj();
00056 virtual ~TKamera();
00057
00058 };
00059
00060 #endif // !defined(AFX_TKAMERA_H__FEB98F91_DDD1_41B0_9C93_00BAD39B215A__INCLUDED_)