29 #ifndef __PHYSICS_RIGIDBODY_H__
30 #define __PHYSICS_RIGIDBODY_H__
79 void SetFriction(
const float linear,
const float angular,
const float contact );
95 float GetMass(
int id = -1 )
const;
103 bool Evaluate(
int timeStepMSec,
int endTimeMSec );
185 friend void RigidBodyDerivatives(
const float t,
const void *clientData,
const float *state,
float *derivatives );
void SetAngularVelocity(const idVec3 &newAngularVelocity, int id=0)
void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)
void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)
void ApplyImpulse(const int id, const idVec3 &point, const idVec3 &impulse)
const int RB_VELOCITY_EXPONENT_BITS
idPhysics_RigidBody(void)
int GetRestStartTime(void) const
struct rididBodyIState_s rigidBodyIState_t
void SetMaster(idEntity *master, const bool orientated)
const idBounds & GetBounds(int id=-1) const
bool TestIfAtRest(void) const
void AddForce(const int id, const idVec3 &point, const idVec3 &force)
const idVec3 & GetAngularVelocity(int id=0) const
void SetPushed(int deltaTime)
rigidBodyPState_t current
bool CollisionImpulse(const trace_t &collision, idVec3 &impulse)
void Save(idSaveGame *savefile) const
void ClipRotation(trace_t &results, const idRotation &rotation, const idClipModel *model) const
const idVec3 & GetOrigin(int id=0) const
bool IsPushable(void) const
void ReadFromSnapshot(const idBitMsgDelta &msg)
friend void RigidBodyDerivatives(const float t, const void *clientData, const float *state, float *derivatives)
const float RB_VELOCITY_MAX
void GetImpactInfo(const int id, const idVec3 &point, impactInfo_t *info) const
bool EvaluateContacts(void)
int GetContents(int id=-1) const
int ClipContents(const idClipModel *model) const
idMat3 inverseInertiaTensor
void WriteToSnapshot(idBitMsgDelta &msg) const
const idVec3 & GetLinearVelocity(int id=0) const
const idBounds & GetAbsBounds(int id=-1) const
const idVec3 & GetPushedAngularVelocity(const int id=0) const
bool IsAtRest(void) const
const idVec3 & GetPushedLinearVelocity(const int id=0) const
void SetFriction(const float linear, const float angular, const float contact)
const int RB_VELOCITY_MANTISSA_BITS
void UpdateTime(int endTimeMSec)
void SetAxis(const idMat3 &newAxis, int id=-1)
float GetMass(int id=-1) const
bool CheckForCollisions(const float deltaTime, rigidBodyPState_t &next, trace_t &collision)
struct rigidBodyPState_s rigidBodyPState_t
void SetContents(int contents, int id=-1)
~idPhysics_RigidBody(void)
CLASS_PROTOTYPE(idPhysics_RigidBody)
const int RB_VELOCITY_TOTAL_BITS
void Rotate(const idRotation &rotation, int id=-1)
void ContactFriction(float deltaTime)
int GetNumClipModels(void) const
void Integrate(const float deltaTime, rigidBodyPState_t &next)
void Translate(const idVec3 &translation, int id=-1)
void Restore(idRestoreGame *savefile)
void ClipTranslation(trace_t &results, const idVec3 &translation, const idClipModel *model) const
void DropToFloorAndRest(void)
void SetBouncyness(const float b)
const idMat3 & GetAxis(int id=0) const
idClipModel * GetClipModel(int id=0) const
void SetOrigin(const idVec3 &newOrigin, int id=-1)
bool Evaluate(int timeStepMSec, int endTimeMSec)
void SetMass(float mass, int id=-1)