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 { 00060 virtual void SetParentCamera(iPcNewCamera * camera) = 0; 00061 00065 virtual bool UseSpringPos() const = 0; 00066 00070 virtual bool UseSpringDir() const = 0; 00071 00075 virtual bool UseSpringUp() const = 0; 00076 00082 virtual bool DrawAttachedMesh() const = 0; 00083 00087 virtual float GetSpringCoefficient() const = 0; 00088 00092 virtual const csVector3 & GetPosition() const = 0; 00093 00097 virtual const csVector3 & GetDirection() const = 0; 00098 00102 virtual const csVector3 & GetUp() const = 0; 00103 00108 virtual bool DecideCameraState() = 0; 00109 }; 00110 00111 SCF_VERSION(iPcNewCamera, 0, 0, 1); 00115 struct iPcNewCamera : public iPcCamera 00116 { 00121 virtual const csVector3 & GetBasePos() const = 0; 00122 00127 virtual const csVector3 & GetBaseDir() const = 0; 00128 00133 virtual const csVector3 & GetBaseUp() const = 0; 00134 00139 virtual const csReversibleTransform & GetBaseTrans() const = 0; 00140 00145 virtual const csVector3 & GetPos() const = 0; 00146 00151 virtual const csVector3 & GetDir() const = 0; 00152 00157 virtual const csVector3 & GetUp() const = 0; 00158 00165 virtual void SetPositionOffset(const csVector3 & offset) = 0; 00166 00171 virtual size_t AttachCameraMode(iCelCameraMode * mode) = 0; 00172 00173 typedef enum _CEL_CAMERA_MODE 00174 { 00175 CCM_FIRST_PERSON, 00176 CCM_THIRD_PERSON, 00177 00178 CCM_COUNT 00179 } CEL_CAMERA_MODE; 00180 00185 virtual size_t AttachCameraMode(CEL_CAMERA_MODE mode) = 0; 00186 00190 virtual size_t GetCurrentCameraModeIndex() const = 0; 00191 00195 virtual iCelCameraMode * GetCurrentCameraMode() = 0; 00196 00201 virtual bool SetCurrentCameraMode(size_t modeIndex) = 0; 00202 00205 virtual void NextCameraMode() = 0; 00206 00209 virtual void PrevCameraMode() = 0; 00210 00214 virtual void Draw() = 0; 00215 }; 00216 00217 #endif // __CEL_PF_NEW_CAMERA__ 00218
Generated for CEL: Crystal Entity Layer by doxygen 1.4.6