propclass/linmove.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2001 PlaneShift Team ([email protected], 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, 1); 00053 00054 virtual void Callback () = 0; 00055 }; 00056 00087 struct iPcLinearMovement : public virtual iBase 00088 { 00089 SCF_INTERFACE (iPcLinearMovement, 0, 0, 2); 00090 00097 virtual void SetAnchor (iPcMesh* pcmesh) = 0; 00098 00102 virtual iPcMesh* GetAnchor () const = 0; 00103 00107 virtual void SetAngularVelocity (const csVector3& angle) = 0; 00108 00114 virtual void SetAngularVelocity (const csVector3& angle, 00115 const csVector3& angle_to_reach) = 0; 00116 00120 virtual void SetSpeed (float speedZ) = 0; 00121 00125 virtual void SetVelocity (const csVector3& vel) = 0; 00126 00131 virtual void AddVelocity (const csVector3& vel) = 0; 00132 00134 virtual void ClearWorldVelocity () = 0; 00135 00136 00140 virtual void GetVelocity (csVector3& v) const = 0; 00141 00145 virtual void GetAngularVelocity (csVector3& v) const = 0; 00146 00155 virtual bool InitCD (iMeshWrapper* mesh, float percentage, 00156 iPcCollisionDetection* pc_cd = 0) = 0; 00157 00166 virtual bool InitCD (const csVector3& body, const csVector3& legs, 00167 const csVector3& shift, iPcCollisionDetection *pc_cd = 0) = 0; 00168 00172 virtual void GetCDDimensions (csVector3& body, csVector3& legs, 00173 csVector3& shift, iPcCollisionDetection*& pc_cd) = 0; 00174 00178 virtual bool InitCD (iPcCollisionDetection *pc_cd=0) = 0; 00179 00184 virtual csTicks TimeDiff (void) = 0; 00185 00187 virtual void GetDRData (bool& on_ground, float& speed, csVector3& pos, 00188 float& yrot, iSector*& sector, csVector3& vel, csVector3& worldVel, 00189 float& ang_vel) = 0; 00190 00191 00193 virtual void SetDRData (bool on_ground,float speed, csVector3& pos, 00194 float yrot, iSector *sector, csVector3& vel, csVector3& worldVel, 00195 float ang_vel) = 0; 00196 00203 virtual void SetSoftDRData (bool on_ground,float speed, csVector3& pos, 00204 float yrot,iSector *sector, csVector3& vel, csVector3& worldVel, 00205 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 00271 virtual void UpdateDR () = 0; 00272 00278 virtual void SetPath (iPath *newpath) = 0; 00279 00284 virtual void SetPathTime (float timeval) = 0; 00285 00293 virtual void SetPathSpeed (float speed) = 0; 00294 00303 virtual void SetPathAction (int which, const char *action) = 0; 00304 00309 virtual void SetPathSector (const char *sectorname) = 0; 00310 00311 virtual bool IsOnGround () const = 0; 00312 00313 virtual void SetOnGround (bool onground) = 0; 00314 00316 virtual void SetHugGround (bool hugGround) = 0; 00317 00318 virtual void SetDeltaLimit (float deltaLimit) = 0; 00319 00320 virtual bool RotateV (float delta) = 0; 00321 00322 virtual void SetGravity (float grav) = 0; 00323 00324 virtual float GetGravity () = 0; 00325 00326 virtual void ResetGravity () = 0; 00327 00334 virtual void AddGravityCallback (iPcGravityCallback* callback) = 0; 00335 00339 virtual void RemoveGravityCallback (iPcGravityCallback* callback) = 0; 00340 00342 virtual csVector3 GetPortalDisplacement () = 0; 00343 00345 virtual void ClearPortalDisplacement () = 0; 00346 00352 virtual void SetFullPosition (const char* center_name, float yrot, 00353 iSector* sector) = 0; 00358 virtual void SetPosition (const char* center_name, float yrot, 00359 iSector* sector) = 0; 00360 }; 00361 00362 #endif 00363
Generated for CEL: Crystal Entity Layer by doxygen 1.4.7