propclass/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 00050 struct iPcGravityCallback : public virtual iBase 00051 { 00052 SCF_INTERFACE (iPcGravityCallback, 0, 0, 2); 00053 00054 virtual void Callback () = 0; 00055 }; 00056 00093 struct iPcLinearMovement : public virtual iBase 00094 { 00095 SCF_INTERFACE (iPcLinearMovement, 0, 0, 2); 00096 00103 virtual void SetAnchor (iPcMesh* pcmesh) = 0; 00104 00108 virtual iPcMesh* GetAnchor () const = 0; 00109 00113 virtual void SetAngularVelocity (const csVector3& angle) = 0; 00114 00120 virtual void SetAngularVelocity (const csVector3& angle, 00121 const csVector3& angle_to_reach) = 0; 00122 00126 virtual void SetSpeed (float speedZ) = 0; 00127 00131 virtual void SetVelocity (const csVector3& vel) = 0; 00132 00137 virtual void AddVelocity (const csVector3& vel) = 0; 00138 00140 virtual void ClearWorldVelocity () = 0; 00141 00142 00147 CS_DEPRECATED_METHOD_MSG("Use csVector3 GetVelocity () instead.") 00148 virtual void GetVelocity (csVector3& v) const = 0; 00149 00153 virtual const csVector3 GetVelocity () const = 0; 00154 00158 virtual void GetAngularVelocity (csVector3& v) const = 0; 00159 00168 virtual bool InitCD (iMeshWrapper* mesh, float percentage, 00169 iPcCollisionDetection* pc_cd = 0) = 0; 00170 00179 virtual bool InitCD (const csVector3& body, const csVector3& legs, 00180 const csVector3& shift, iPcCollisionDetection *pc_cd = 0) = 0; 00181 00185 virtual void GetCDDimensions (csVector3& body, csVector3& legs, 00186 csVector3& shift, iPcCollisionDetection*& pc_cd) = 0; 00187 00191 virtual bool InitCD (iPcCollisionDetection *pc_cd=0) = 0; 00192 00197 virtual csTicks TimeDiff (void) = 0; 00198 00200 virtual void GetDRData (bool& on_ground, float& speed, csVector3& pos, 00201 float& yrot, iSector*& sector, csVector3& vel, csVector3& worldVel, 00202 float& ang_vel) = 0; 00203 00204 00206 virtual void SetDRData (bool on_ground,float speed, csVector3& pos, 00207 float yrot, iSector *sector, csVector3& vel, csVector3& worldVel, 00208 float ang_vel) = 0; 00209 00216 virtual void SetSoftDRData (bool on_ground,float speed, csVector3& pos, 00217 float yrot,iSector *sector, csVector3& vel, csVector3& worldVel, 00218 float ang_vel) = 0; 00219 00224 virtual void SetFullPosition (const csVector3& pos, float yrot, 00225 const iSector* sector) = 0; 00230 virtual void SetPosition (const csVector3& pos, float yrot, 00231 const iSector* sector) = 0; 00237 virtual void GetLastPosition (csVector3& pos, float& yrot, 00238 iSector*& sector) = 0; 00243 virtual void GetLastFullPosition (csVector3& pos, float& yrot, 00244 iSector*& sector) = 0; 00245 00249 virtual float GetYRotation () = 0; 00255 virtual const csVector3 GetPosition () = 0; 00260 virtual const csVector3 GetFullPosition () = 0; 00261 00263 virtual bool IsPath () const = 0; 00264 00268 virtual iSector* GetSector () = 0; 00269 00274 virtual void ExtrapolatePosition (float delta) = 0; 00275 00282 virtual void UpdateDRDelta (csTicks ticksdelta) = 0; 00283 00291 virtual void UpdateDR (csTicks ticks) = 0; 00292 00300 virtual void UpdateDR () = 0; 00301 00307 virtual void SetPath (iPath *newpath) = 0; 00308 00313 virtual void SetPathTime (float timeval) = 0; 00314 00322 virtual void SetPathSpeed (float speed) = 0; 00323 00332 virtual void SetPathAction (int which, const char *action) = 0; 00333 00338 virtual void SetPathSector (const char *sectorname) = 0; 00339 00340 virtual bool IsOnGround () const = 0; 00341 00342 virtual void SetOnGround (bool onground) = 0; 00343 00345 virtual void SetHugGround (bool hugGround) = 0; 00346 00347 virtual void SetDeltaLimit (float deltaLimit) = 0; 00348 00349 virtual bool RotateV (float delta) = 0; 00350 00351 virtual void SetGravity (float grav) = 0; 00352 00353 virtual float GetGravity () = 0; 00354 00355 virtual void ResetGravity () = 0; 00356 00363 virtual void AddGravityCallback (iPcGravityCallback* callback) = 0; 00364 00368 virtual void RemoveGravityCallback (iPcGravityCallback* callback) = 0; 00369 00371 virtual csVector3 GetPortalDisplacement () = 0; 00372 00374 virtual void ClearPortalDisplacement () = 0; 00375 00381 virtual void SetFullPosition (const char* center_name, float yrot, 00382 iSector* sector) = 0; 00387 virtual void SetPosition (const char* center_name, float yrot, 00388 iSector* sector) = 0; 00389 }; 00390 00391 #endif 00392
Generated for CEL: Crystal Entity Layer 1.2 by doxygen 1.4.7
