CEL

Public API Reference

propclass/newcamera.h

00001 /*
00002     Crystal Space Entity Layer
00003     Copyright (C) 2001 by Jorrit Tyberghein
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CEL_PF_NEW_CAMERA__
00021 #define __CEL_PF_NEW_CAMERA__
00022 
00023 #include "cstypes.h"
00024 #include "iutil/comp.h"
00025 #include "iutil/eventh.h"
00026 #include "csutil/scf.h"
00027 #include "csutil/weakref.h"
00028 #include "csutil/weakrefarr.h"
00029 #include "csutil/refarr.h"
00030 #include "physicallayer/propclas.h"
00031 #include "physicallayer/propfact.h"
00032 #include "physicallayer/facttmpl.h"
00033 #include "celtool/stdpcimp.h"
00034 #include "celtool/stdparams.h"
00035 #include "celtool/camera.h"
00036 #include "propclass/region.h"
00037 #include "propclass/mesh.h"
00038 
00039 struct iCelEntity;
00040 struct iObjectRegistry;
00041 struct iGraphics3D;
00042 struct iEngine;
00043 struct iVirtualClock;
00044 struct iKeyboardDriver;
00045 struct iMouseDriver;
00046 struct iCollideSystem;
00047 struct iView;
00048 class csView;
00049 class celPcNewCamera;
00050 class csReversibleTransform;
00051 struct iPcZoneManager;
00052 
00053 struct iPcNewCamera;
00054 
00055 struct iCelCameraMode
00056 {
00061   virtual void SetParentCamera(iPcNewCamera * camera) = 0;
00062 
00068   virtual bool UseSpringPos() const = 0;
00069 
00075   virtual bool UseSpringTarget() const = 0;
00076 
00082   virtual bool UseSpringUp() const = 0;
00083 
00089   virtual bool AllowCollisionDetection() const = 0;
00090 
00096   virtual bool DrawAttachedMesh() const = 0;
00097   
00102   virtual float GetSpringCoefficient() const = 0;
00103 
00108   virtual const csVector3 & GetPosition() const = 0;
00109 
00114   virtual const csVector3 & GetTarget() const = 0;
00115   
00120   virtual const csVector3 & GetUp() const = 0;
00121 
00127   virtual bool DecideCameraState() = 0; 
00128 };
00129 
00130 SCF_VERSION(iPcNewCamera, 0, 0, 1);
00131 
00135 struct iPcNewCamera : public iPcCamera
00136 {
00141   virtual const csVector3 & GetBasePos() const = 0;
00142 
00147   virtual const csVector3 & GetBaseDir() const = 0;
00148 
00153   virtual const csVector3 & GetBaseUp() const = 0;
00154 
00159   virtual const csReversibleTransform & GetBaseTrans() const = 0;
00160 
00165   virtual const csVector3 & GetPos() const = 0;
00166 
00171   virtual const csVector3 & GetTarget() const = 0;
00172 
00177   virtual const csVector3 & GetUp() const = 0;
00178 
00185   virtual void SetPositionOffset(const csVector3 & offset) = 0;
00186 
00192   virtual bool DetectCollisions() const = 0;
00193 
00199   virtual void SetCollisionDetection(bool detectCollisions) = 0;
00200 
00205   virtual void SetCollisionSpringCoefficient(float springCoef) = 0;
00206 
00211   virtual float GetCollisionSpringCoefficient() const = 0;
00212 
00218   virtual bool InCameraTransition() const = 0;
00219 
00225   virtual void SetTransitionSpringCoefficient(float springCoef) = 0;
00226 
00232   virtual float GetTransitionSpringCoefficient() const = 0;
00233 
00243   virtual void SetTransitionCutoffDistance(float cutOffPosDist,
00244       float cutOffTargetDist) = 0;
00245 
00251   virtual float GetTransitionCutoffPosDistance() const = 0;
00252 
00258   virtual float GetTransitionCutoffTargetDistance() const = 0;
00259 
00265   virtual size_t AttachCameraMode(iCelCameraMode * mode) = 0;
00266 
00267   enum CEL_CAMERA_MODE
00268   {
00269     CCM_FIRST_PERSON,
00270     CCM_THIRD_PERSON,
00271     CCM_COUNT
00272   };
00273 
00279   virtual size_t AttachCameraMode(CEL_CAMERA_MODE mode) = 0;
00280 
00285   virtual size_t GetCurrentCameraModeIndex() const = 0;
00286 
00291   virtual iCelCameraMode * GetCurrentCameraMode() = 0;
00292 
00298   virtual bool SetCurrentCameraMode(size_t modeIndex) = 0;
00299 
00303   virtual void NextCameraMode() = 0;
00304 
00308   virtual void PrevCameraMode() = 0;
00309 
00313   virtual void Draw() = 0;
00314 };
00315 
00316 #endif // __CEL_PF_NEW_CAMERA__
00317 

Generated for CEL: Crystal Entity Layer by doxygen 1.4.7