Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

SceneCamera.h

00001 
00002 #ifndef __SCENECAMERA_H_
00003 #define __SCENECAMERA_H_
00004 /*
00005 Peon - Win32 Games Programming Library
00006 Copyright (C) 2002-2005 Erik Yuzwa
00007 
00008 This library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Library General Public
00010 License as published by the Free Software Foundation; either
00011 version 2 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Library General Public License for more details.
00017 
00018 You should have received a copy of the GNU Library General Public
00019 License along with this library; if not, write to the Free
00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 Erik Yuzwa
00023 peon AT wazooinc DOT com
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                 //this rotates the view around a specified axis.
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

Generated on Thu Dec 1 01:55:40 2005 for Peon by  doxygen 1.4.1