64 #define CONTACT_EPSILON 0.25f // maximum contact seperation distance
97 virtual void SetMass(
float mass,
int id = -1 ) = 0;
98 virtual float GetMass(
int id = -1 )
const = 0;
100 virtual void SetContents(
int contents,
int id = -1 ) = 0;
109 virtual bool Evaluate(
int timeStepMSec,
int endTimeMSec ) = 0;
111 virtual void UpdateTime(
int endTimeMSec ) = 0;
113 virtual int GetTime(
void )
const = 0;
120 virtual bool IsAtRest(
void )
const = 0;
128 virtual void SetAxis(
const idMat3 &newAxis,
int id = -1 ) = 0;
169 virtual void SetPushed(
int deltaTime ) = 0;
virtual const idVec3 & GetOrigin(int id=0) const =0
virtual void EnableClip(void)=0
virtual const idVec3 & GetGravityNormal(void) const =0
virtual int GetClipMask(int id=-1) const =0
virtual void SetContents(int contents, int id=-1)=0
virtual void SetMass(float mass, int id=-1)=0
virtual void PutToRest(void)=0
virtual void ApplyImpulse(const int id, const idVec3 &point, const idVec3 &impulse)=0
virtual void SetClipBox(const idBounds &bounds, float density)
virtual void SaveState(void)=0
virtual void Rotate(const idRotation &rotation, int id=-1)=0
virtual void GetImpactInfo(const int id, const idVec3 &point, impactInfo_t *info) const =0
virtual void SetPushed(int deltaTime)=0
virtual void LinkClip(void)=0
virtual void UnlinkClip(void)=0
virtual int GetNumClipModels(void) const =0
virtual int GetLinearEndTime(void) const =0
struct impactInfo_s impactInfo_t
virtual const idVec3 & GetPushedAngularVelocity(const int id=0) const =0
virtual const idVec3 & GetLinearVelocity(int id=0) const =0
virtual void Translate(const idVec3 &translation, int id=-1)=0
virtual void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)=0
void Save(idSaveGame *savefile) const
virtual bool IsGroundClipModel(int entityNum, int id) const =0
virtual const idVec3 & GetPushedLinearVelocity(const int id=0) const =0
virtual void RestoreState(void)=0
virtual int GetRestStartTime(void) const =0
virtual void AddContactEntity(idEntity *e)=0
virtual const idBounds & GetBounds(int id=-1) const =0
virtual void AddForce(const int id, const idVec3 &point, const idVec3 &force)=0
void Restore(idRestoreGame *savefile)
virtual const contactInfo_t & GetContact(int num) const =0
virtual void ClipTranslation(trace_t &results, const idVec3 &translation, const idClipModel *model) const =0
virtual const trace_t * GetBlockingInfo(void) const =0
virtual void ReadFromSnapshot(const idBitMsgDelta &msg)=0
virtual void SetGravity(const idVec3 &newGravity)=0
ABSTRACT_PROTOTYPE(idPhysics)
virtual float GetMass(int id=-1) const =0
virtual const idVec3 & GetAngularVelocity(int id=0) const =0
virtual void SetOrigin(const idVec3 &newOrigin, int id=-1)=0
virtual const idMat3 & GetAxis(int id=0) const =0
virtual bool Evaluate(int timeStepMSec, int endTimeMSec)=0
virtual bool HasGroundContacts(void) const =0
virtual void DisableClip(void)=0
virtual idClipModel * GetClipModel(int id=0) const =0
virtual bool IsPushable(void) const =0
virtual void WriteToSnapshot(idBitMsgDelta &msg) const =0
virtual void ClipRotation(trace_t &results, const idRotation &rotation, const idClipModel *model) const =0
virtual int GetNumContacts(void) const =0
virtual const idBounds & GetAbsBounds(int id=-1) const =0
virtual void RemoveContactEntity(idEntity *e)=0
virtual bool IsGroundEntity(int entityNum) const =0
virtual void SetAngularVelocity(const idVec3 &newAngularVelocity, int id=0)=0
virtual int ClipContents(const idClipModel *model) const =0
virtual void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)=0
static int SnapTimeToPhysicsFrame(int t)
virtual void SetMaster(idEntity *master, const bool orientated=true)=0
virtual idEntity * GetBlockingEntity(void) const =0
virtual bool EvaluateContacts(void)=0
virtual int GetContents(int id=-1) const =0
virtual bool IsAtRest(void) const =0
virtual void UpdateTime(int endTimeMSec)=0
virtual void SetSelf(idEntity *e)=0
virtual const idVec3 & GetGravity(void) const =0
virtual void Activate(void)=0
virtual void SetClipMask(int mask, int id=-1)=0
virtual int GetAngularEndTime(void) const =0
virtual int GetTime(void) const =0
virtual void ClearContacts(void)=0
virtual void SetAxis(const idMat3 &newAxis, int id=-1)=0