29 #include "../../idlib/precompiled.h"
32 #include "../Game_local.h"
57 clipModels.SetNum( 1 );
68 self->SetPhysics(
NULL );
87 for ( i = 0; i <
current.Num(); i++ ) {
111 savefile->
ReadObject( reinterpret_cast<idClass *&>(
self ) );
115 for ( i = 0; i <
num; i++ ) {
124 for ( i = 0; i <
num; i++ ) {
241 }
else if (
id == -1 ) {
262 }
else if (
id == -1 ) {
359 self->GetMasterPosition( masterOrigin, masterAxis );
401 memset( info, 0,
sizeof( *info ) );
491 self->GetMasterPosition( masterOrigin, masterAxis );
492 current[
id].origin = masterOrigin + newOrigin * masterAxis;
499 }
else if (
id == -1 ) {
501 self->GetMasterPosition( masterOrigin, masterAxis );
521 self->GetMasterPosition( masterOrigin, masterAxis );
529 }
else if (
id == -1 ) {
534 self->GetMasterPosition( masterOrigin, masterAxis );
535 axis =
current[0].axis.Transpose() * ( newAxis * masterAxis );
537 axis =
current[0].axis.Transpose() * newAxis;
561 }
else if (
id == -1 ) {
563 current[
i].localOrigin += translation;
588 self->GetMasterPosition( masterOrigin, masterAxis );
599 }
else if (
id == -1 ) {
605 self->GetMasterPosition( masterOrigin, masterAxis );
710 static idVec3 gravity( 0, 0, -1 );
720 memset( &results, 0,
sizeof(
trace_t ) );
730 memset( &results, 0,
sizeof(
trace_t ) );
841 memset( &info, 0,
sizeof( info ) );
935 self->GetMasterPosition( masterOrigin, masterAxis );
1001 for ( i = 0; i <
current.Num(); i++ ) {
1003 localQuat =
current[
i].localAxis.ToCQuat();
1032 for ( i = 0; i <
current.Num(); i++ ) {
const trace_t * GetBlockingInfo(void) const
int GetAngularEndTime(void) const
bool AddBounds(const idBounds &a)
const contactInfo_t & GetContact(int num) const
int ClipContents(const idClipModel *model) const
assert(prefInfo.fullscreenBtn)
idMat3 mat3_identity(idVec3(1, 0, 0), idVec3(0, 1, 0), idVec3(0, 0, 1))
void WriteObject(const idClass *obj)
void SetSelf(idEntity *e)
void AddContactEntity(idEntity *e)
float GetFloat(void) const
void SetLinearVelocity(const idVec3 &newLinearVelocity, int id=0)
void SetNum(int newnum, bool resize=true)
void Restore(idRestoreGame *savefile)
void RemoveContactEntity(idEntity *e)
idMat3 Transpose(void) const
void AssureSize(int newSize)
void Save(idSaveGame *savefile) const
const idMat3 & GetAxis(int id=0) const
const idMat3 & GetAxis(void) const
void UpdateTime(int endTimeMSec)
const idBounds & GetAbsBounds(int id=-1) const
idBounds bounds_zero(vec3_zero, vec3_zero)
void ReadBool(bool &value)
static void DeletePhysics(const idPhysics *phys)
const idVec3 & GetLinearVelocity(int id=0) const
const idVec3 & GetOrigin(void) const
bool IsGroundEntity(int entityNum) const
int GetNumContacts(void) const
int GetContents(int id=-1) const
void WriteClipModel(const class idClipModel *clipModel)
void WriteVec3(const idVec3 &vec)
void SetMass(float mass, int id=-1)
bool Evaluate(int timeStepMSec, int endTimeMSec)
void WriteBool(const bool value)
bool IsGroundClipModel(int entityNum, int id) const
void void void Warning(const char *fmt,...) const id_attribute((format(printf
const idVec3 & GetOrigin(int id=0) const
~idPhysics_StaticMulti(void)
END_CLASS staticPState_t defaultState
const idVec3 & GetGravity(void) const
idPhysics * GetPhysics(void) const
void SetMaster(idEntity *master, const bool orientated=true)
void WriteDeltaFloat(float oldValue, float newValue)
bool IsAtRest(void) const
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
void ApplyImpulse(const int id, const idVec3 &point, const idVec3 &impulse)
idCVar g_gravity("g_gravity", DEFAULT_GRAVITY_STRING, CVAR_GAME|CVAR_FLOAT,"")
void SetAngularVelocity(const idVec3 &newAngularVelocity, int id=0)
cmHandle_t Handle(void) const
bool IsPushable(void) const
idClipModel * DefaultClipModel(void)
void GetImpactInfo(const int id, const idVec3 &point, impactInfo_t *info) const
void AddForce(const int id, const idVec3 &point, const idVec3 &force)
float ReadDeltaFloat(float oldValue) const
bool HasGroundContacts(void) const
bool EvaluateContacts(void)
idEntity * GetBlockingEntity(void) const
idList< idClipModel * > clipModels
const idVec3 & GetAngularVelocity(int id=0) const
void WriteInt(const int value)
void SetClipMask(int mask, int id=-1)
int GetRestStartTime(void) const
void WriteMat3(const idMat3 &mat)
void Rotate(const idRotation &rotation, int id=-1)
void ReadMat3(idMat3 &mat)
void SetAxis(const idMat3 &newAxis, int id=-1)
void ClipTranslation(trace_t &results, const idVec3 &translation, const idClipModel *model) const
idList< staticPState_t > current
const idBounds & GetBounds(int id=-1) const
void ReadClipModel(idClipModel *&clipModel)
const idVec3 & GetGravityNormal(void) const
void SetOrigin(const idVec3 &rotationOrigin)
idMat3 ToMat3(void) const
int GetLinearEndTime(void) const
const idMat3 & ToMat3(void) const
bool RemoveIndex(int index)
void WriteToSnapshot(idBitMsgDelta &msg) const
int Contents(const idVec3 &start, const idClipModel *mdl, const idMat3 &trmAxis, int contentMask, const idEntity *passEntity)
int ContentsModel(const idVec3 &start, const idClipModel *mdl, const idMat3 &trmAxis, int contentMask, cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis)
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
void ReadVec3(idVec3 &vec)
idRotation ToRotation(void) const
void RemoveIndex(int id=0, bool freeClipModel=true)
float ReadFloat(void) const
void Translate(const idVec3 &translation, int id=-1)
int GetClipMask(int id=-1) const
float GetMass(int id=-1) const
void ClipRotation(trace_t &results, const idRotation &rotation, const idClipModel *model) const
void ReadFromSnapshot(const idBitMsgDelta &msg)
void SetGravity(const idVec3 &newGravity)
void SetClipModel(idClipModel *model, float density, int id=0, bool freeOld=true)
void SetPushed(int deltaTime)
int GetNumClipModels(void) const
const idVec3 & GetPushedAngularVelocity(const int id=0) const
const idVec3 & GetPushedLinearVelocity(const int id=0) const
void SetContents(int contents, int id=-1)
idClipModel * GetClipModel(int id=0) const
void SetOrigin(const idVec3 &newOrigin, int id=-1)
void ReadObject(idClass *&obj)