Main Page   Class Hierarchy   Compound List   File List   Compound Members  

camera.h

00001 /*
00002     Copyright (C) 1998-2001 by Jorrit Tyberghein
00003   
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008   
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013   
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __IENGINE_CAMERA_H__
00020 #define __IENGINE_CAMERA_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csgeom/transfrm.h"
00024 
00025 #define VEC_FORWARD   csVector3(0,0,1)
00026 #define VEC_BACKWARD  csVector3(0,0,-1)
00027 #define VEC_RIGHT     csVector3(1,0,0)
00028 #define VEC_LEFT      csVector3(-1,0,0)
00029 #define VEC_UP        csVector3(0,1,0)
00030 #define VEC_DOWN      csVector3(0,-1,0)
00031 
00032 #define VEC_ROT_RIGHT  csVector3(0,1,0)
00033 #define VEC_ROT_LEFT   csVector3(0,-1,0)
00034 #define VEC_TILT_RIGHT (-csVector3(0,0,1))
00035 #define VEC_TILT_LEFT  (-csVector3(0,0,-1))
00036 #define VEC_TILT_UP    (-csVector3(1,0,0))
00037 #define VEC_TILT_DOWN  (-csVector3(-1,0,0))
00038 
00039 class csCamera;
00040 class csVector3;
00041 class csVector2;
00042 struct iSector;
00043 
00044 SCF_VERSION (iCamera, 0, 0, 12);
00045 
00047 struct iCamera : public iBase
00048 {
00050   virtual csCamera* GetPrivateObject () = 0;
00051 
00053   virtual int GetFOV () const = 0;
00055   virtual float GetInvFOV () const = 0;
00057   virtual float GetFOVAngle () const = 0;
00059   virtual void SetFOV (int a, int width) = 0;
00061   virtual void SetFOVAngle (float a, int width) = 0;
00062 
00064   virtual float GetShiftX () const = 0;
00066   virtual float GetShiftY () const = 0;
00068   virtual void SetPerspectiveCenter (float x, float y) = 0;
00069 
00078   virtual csOrthoTransform& GetTransform () = 0;
00083   virtual void SetTransform (const csOrthoTransform& tr) = 0;
00084 
00091   virtual void MoveWorld (const csVector3& v, bool cd = true) = 0;
00095   virtual void Move (const csVector3& v, bool cd = true) = 0;
00103   virtual void MoveWorldUnrestricted (const csVector3& v) = 0;
00111   virtual void MoveUnrestricted (const csVector3& v) = 0;
00112 
00114   virtual iSector* GetSector () const = 0;
00116   virtual void SetSector (iSector*) = 0;
00117 
00122   virtual void Correct (int n) = 0;
00123 
00125   virtual bool IsMirrored () const = 0;
00127   virtual void SetMirrored (bool m) = 0;
00128 
00135   virtual bool GetFarPlane (csPlane3& pl) const = 0;
00136 
00143   virtual long GetCameraNumber () const = 0;
00144 
00146   virtual void Perspective (const csVector3& v, csVector2& p) const = 0;
00148   virtual void InvPerspective (const csVector2& p, float z,
00149         csVector3& v) const = 0;
00150 
00158   virtual void OnlyPortals (bool hop) = 0;
00159 
00161   virtual bool GetOnlyPortals () = 0;
00162 };
00163 
00164 #endif

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000