Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members
linmove.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2001 PlaneShift Team (info@planeshift.it, 00004 Copyright (C) 2001-2003 by Jorrit Tyberghein 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with this library; if not, write to the Free 00018 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 */ 00020 00021 /* 00022 * This code is heavily based on pslinmove from the PlaneShift project. 00023 * Thanks a lot for making this! 00024 */ 00025 00026 #ifndef __CEL_PF_LINEAR_MOVE__ 00027 #define __CEL_PF_LINEAR_MOVE__ 00028 00029 #include "cstypes.h" 00030 #include "csutil/scf.h" 00031 #include "csutil/strhash.h" 00032 00033 00034 struct iDataBuffer; 00035 struct iSector; 00036 struct iPath; 00037 struct iPcCollisionDetection; 00038 struct iPcMesh; 00039 struct iMeshWrapper; 00040 00041 00042 SCF_VERSION (iPcGravityCallback, 0, 0, 1); 00043 00052 struct iPcGravityCallback : public iBase 00053 { 00054 public: 00055 virtual void Callback () = 0; 00056 }; 00057 00058 SCF_VERSION (iPcLinearMovement, 0, 0, 1); 00059 00087 struct iPcLinearMovement : public iBase 00088 { 00095 virtual void SetAnchor (iPcMesh* pcmesh) = 0; 00096 00100 virtual iPcMesh* GetAnchor () const = 0; 00101 00105 virtual void SetAngularVelocity (const csVector3& angle) = 0; 00106 00112 virtual void SetAngularVelocity (const csVector3& angle, 00113 const csVector3& angle_to_reach) = 0; 00114 00118 virtual void SetSpeed (float speedZ) = 0; 00119 00123 virtual void SetVelocity (const csVector3& vel) = 0; 00124 00129 virtual void AddVelocity (const csVector3& vel) = 0; 00130 00132 virtual void ClearWorldVelocity () = 0; 00133 00134 00138 virtual void GetVelocity (csVector3& v) const = 0; 00139 00143 virtual void GetAngularVelocity (csVector3& v) const = 0; 00144 00153 virtual bool InitCD (iMeshWrapper* mesh, float percentage, 00154 iPcCollisionDetection* pc_cd = 0) = 0; 00155 00164 virtual bool InitCD (const csVector3& body, const csVector3& legs, 00165 const csVector3& shift, iPcCollisionDetection *pc_cd = 0) = 0; 00166 00170 virtual void GetCDDimensions (csVector3& body, csVector3& legs, 00171 csVector3& shift, iPcCollisionDetection*& pc_cd) = 0; 00172 00176 virtual bool InitCD (iPcCollisionDetection *pc_cd=0) = 0; 00177 00179 virtual csTicks TimeDiff(void) = 0; 00180 00182 virtual void GetDRData(bool& on_ground, 00183 float& speed, 00184 csVector3& pos, 00185 float& yrot, 00186 iSector*& sector, 00187 csVector3& vel, 00188 csVector3& worldVel, 00189 float& ang_vel) = 0; 00190 00191 00193 virtual void SetDRData(bool on_ground,float speed, 00194 csVector3& pos,float yrot,iSector *sector, 00195 csVector3& vel,csVector3& worldVel,float ang_vel) = 0; 00196 00203 virtual void SetSoftDRData(bool on_ground,float speed, 00204 csVector3& pos,float yrot,iSector *sector, 00205 csVector3& vel, csVector3& worldVel,float ang_vel) = 0; 00206 00211 virtual void SetFullPosition (const csVector3& pos, float yrot, 00212 const iSector* sector) = 0; 00217 virtual void SetPosition (const csVector3& pos, float yrot, 00218 const iSector* sector) = 0; 00224 virtual void GetLastPosition (csVector3& pos, float& yrot, 00225 iSector*& sector) = 0; 00230 virtual void GetLastFullPosition (csVector3& pos, float& yrot, 00231 iSector*& sector) = 0; 00232 00234 virtual bool IsPath() const = 0; 00235 00239 virtual iSector* GetSector () = 0; 00240 00245 virtual void ExtrapolatePosition (float delta) = 0; 00246 00253 virtual void UpdateDRDelta (csTicks ticksdelta) = 0; 00254 00262 virtual void UpdateDR (csTicks ticks) = 0; 00263 00269 virtual void SetPath (iPath *newpath) = 0; 00270 00275 virtual void SetPathTime (float timeval) = 0; 00276 00284 virtual void SetPathSpeed (float speed) = 0; 00285 00294 virtual void SetPathAction (int which, const char *action) = 0; 00295 00300 virtual void SetPathSector (const char *sectorname) = 0; 00301 00302 virtual bool IsOnGround () const = 0; 00303 00304 virtual void SetOnGround (bool onground) = 0; 00305 00306 virtual void SetDeltaLimit(float deltaLimit) = 0; 00307 00308 virtual bool RotateV (float delta) = 0; 00309 00310 virtual void SetGravity (float grav) = 0; 00311 00312 virtual float GetGravity() = 0; 00313 00314 virtual void ResetGravity() = 0; 00315 00322 virtual void AddGravityCallback (iPcGravityCallback* callback) = 0; 00323 00327 virtual void RemoveGravityCallback (iPcGravityCallback* callback) = 0; 00328 00330 virtual csVector3 GetPortalDisplacement() = 0; 00331 00333 virtual void ClearPortalDisplacement() = 0; 00334 }; 00335 00336 #endif 00337
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4