00001
00002 #ifndef __SCENECAMERA_H_
00003 #define __SCENECAMERA_H_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "ISceneObject.h"
00028 #include "Vector3.h"
00029 #include "Plane.h"
00030
00031 namespace peon
00032 {
00037 class PEONMAIN_API SceneCamera : public ISceneObject
00038 {
00039
00040 protected:
00041
00043 Vector3 m_vecUp;
00044
00046 Vector3 m_vecLookAt;
00047
00049 Plane m_oFrustumPlanes[6];
00050
00051
00052 public:
00056 SceneCamera();
00057
00061 ~SceneCamera();
00062
00068 void generateViewFrustum();
00069
00079 bool isSphereInFrustum( float x, float y, float z, float fRadius );
00080
00088 void setPerspectiveProj( float fAspect, float z_min, float z_max );
00089
00096 void setViewMatrix( Vector3& vecEye, Vector3& vecLookAt, Vector3& vecUp);
00097
00098
00099 void rotateView(float X, float Y, float Z);
00100
00101
00102 virtual void updateView();
00103
00109 virtual void onMouseEvent( SDL_Event* pEvent );
00110
00111 };
00112 }
00113
00114 #endif