## Public API Reference

- Main Page
- Classes
- Files

# propclass/defcam.h

    00001 /*
    00002     Crystal Space Entity Layer
    00003     Copyright (C) 2001-2005 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_DEFAULT_CAMERA__
    00021 #define __CEL_PF_DEFAULT_CAMERA__
    00022
    00023 #include "propclass/camera.h"
    00024
    00025 struct iCelEntity;
    00026
    00027 SCF_VERSION (iPcDefaultCamera, 0, 0, 3);
    00028
    00046 struct iPcDefaultCamera : public iPcCamera
    00047 {
    00048 public:
    00052   enum CameraMode
    00053   {
    00054     freelook = 0,
    00055     firstperson,
    00056     thirdperson,
    00057     m64_thirdperson,
    00058     lara_thirdperson,
    00059
    00060     actual_data,        // The actual camera data
    00061     last_actual,        // Keep reference to the actual data last frame
    00062     transition,
    00063     camerror,           // Error between actual camera pos and ideal.
    00064
    00065     CameraMode_count
    00066   };
    00067
    00073   virtual void SetFollowEntity (iCelEntity* entity) = 0;
    00074
    00078   virtual bool SetMode (CameraMode m, bool use_cd = true) = 0;
    00079
    00083   virtual CameraMode GetMode () const = 0;
    00084
    00088   virtual bool SetModeName (const char* m, bool use_cd = true) = 0;
    00089
    00093   virtual const char* GetModeName () const = 0;
    00094
    00099   virtual CameraMode GetNextMode () const = 0;
    00100
    00104   virtual void SetSpringParameters (float springCoef,
    00105         float intertialDampeningCoef, float springLength) = 0;
    00106
    00112   virtual void SetMinMaxCameraDistance (float minDistance,
    00113         float maxDistance) = 0;
    00114
    00119   virtual void SetTurnSpeed (float turnSpeed) = 0;
    00120
    00124   virtual void SetSwingCoef (float swingCoef) = 0;
    00125
    00130   virtual void SetFirstPersonOffset (const csVector3& offset) = 0;
    00131
    00136   virtual void SetThirdPersonOffset (const csVector3& offset) = 0;
    00137
    00142   virtual void CenterCamera () = 0;
    00143
    00147   virtual void SetPitch (float pitch) = 0;
    00148
    00152   virtual float GetPitch () const = 0;
    00153
    00158   virtual void SetPitchVelocity (float pitchVel) = 0;
    00159
    00163   virtual float GetPitchVelocity () const = 0;
    00164
    00171   virtual void MovePitch (float deltaPitch, int mode = -1) = 0;
    00172
    00179   virtual void SetYaw (float yaw, int mode = -1) = 0;
    00180
    00187   virtual void MoveYaw (float deltaYaw, int mode = -1) = 0;
    00188
    00195   virtual float GetYaw (int mode = -1) const = 0;
    00196
    00201   virtual void SetYawVelocity (float yawVel) = 0;
    00202
    00207   virtual float GetYawVelocity () const = 0;
    00208
    00214   virtual void SetDistance (float distance, int mode=-1) = 0;
    00215 };
    00216
    00217 #endif // __CEL_PF_DEFAULT_CAMERA_FACTORY__
    00218