00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __NEPROJECTION_H
00029 #define __NEPROJECTION_H
00030
00031
00037 #include "base.h"
00038 #include "nemath.h"
00039
00040
00041 namespace NeoEngine
00042 {
00043
00044
00046 class Viewport;
00047
00048
00049
00050
00051
00057 class NEOENGINE_API Projection
00058 {
00059 public:
00060
00065 enum PROJECTIONMODE
00066 {
00068 INVALIDPROJECTION = -1,
00069
00071 PERSPECTIVE = 0,
00072
00074 ORTHOGRAPHIC = 1,
00075
00077 CUSTOM = 2
00078 };
00079
00080
00082 PROJECTIONMODE m_eMode;
00083
00085 float m_fZNear;
00086
00088 float m_fZFar;
00089
00091 Matrix m_kMatrix;
00092
00093
00096 Projection();
00097
00102 virtual void BuildProjection( const Viewport &rkViewport ) {}
00103 };
00104
00105
00106
00107
00108
00114 class NEOENGINE_API PerspectiveProjection : public Projection
00115 {
00116 public:
00117
00119 float m_fFOV;
00120
00124 PerspectiveProjection();
00125
00126
00131 virtual void BuildProjection( const Viewport &rkViewport );
00132 };
00133
00134
00135
00136
00137
00138
00139
00145 class NEOENGINE_API OrthographicProjection : public Projection
00146 {
00147 public:
00148
00150 float m_fLeft;
00151
00153 float m_fTop;
00154
00156 float m_fRight;
00157
00159 float m_fBottom;
00160
00162 float m_fZNear;
00163
00165 float m_fZFar;
00166
00170 OrthographicProjection();
00171
00172
00177 virtual void BuildProjection( const Viewport &rkViewport );
00178 };
00179
00180
00181 };
00182
00183
00184 #endif // __NEPROJECTION_H
00185