doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
idPhysics_Monster Class Reference

#include <Physics_Monster.h>

Inheritance diagram for idPhysics_Monster:
idPhysics_Actor idPhysics_Base idPhysics idClass

Public Member Functions

 CLASS_PROTOTYPE (idPhysics_Monster)
 
 idPhysics_Monster (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
void SetMaxStepHeight (const float newMaxStepHeight)
 
float GetMaxStepHeight (void) const
 
void SetMinFloorCosine (const float newMinFloorCosine)
 
void SetDelta (const idVec3 &d)
 
bool OnGround (void) const
 
monsterMoveResult_t GetMoveResult (void) const
 
void ForceDeltaMove (bool force)
 
void UseFlyMove (bool force)
 
void UseVelocityMove (bool force)
 
idEntityGetSlideMoveEntity (void) const
 
void EnableImpact (void)
 
void DisableImpact (void)
 
bool Evaluate (int timeStepMSec, int endTimeMSec)
 
void UpdateTime (int endTimeMSec)
 
int GetTime (void) const
 
void GetImpactInfo (const int id, const idVec3 &point, impactInfo_t *info) const
 
void ApplyImpulse (const int id, const idVec3 &point, const idVec3 &impulse)
 
void Activate (void)
 
void PutToRest (void)
 
bool IsAtRest (void) const
 
int GetRestStartTime (void) const
 
void SaveState (void)
 
void RestoreState (void)
 
void SetOrigin (const idVec3 &newOrigin, int id=-1)
 
void SetAxis (const idMat3 &newAxis, int id=-1)
 
void Translate (const idVec3 &translation, int id=-1)
 
void Rotate (const idRotation &rotation, int id=-1)
 
void SetLinearVelocity (const idVec3 &newLinearVelocity, int id=0)
 
const idVec3GetLinearVelocity (int id=0) const
 
void SetPushed (int deltaTime)
 
const idVec3GetPushedLinearVelocity (const int id=0) const
 
void SetMaster (idEntity *master, const bool orientated=true)
 
void WriteToSnapshot (idBitMsgDelta &msg) const
 
void ReadFromSnapshot (const idBitMsgDelta &msg)
 
- Public Member Functions inherited from idPhysics_Actor
 CLASS_PROTOTYPE (idPhysics_Actor)
 
 idPhysics_Actor (void)
 
 ~idPhysics_Actor (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
float GetMasterDeltaYaw (void) const
 
idEntityGetGroundEntity (void) const
 
void SetClipModelAxis (void)
 
void SetClipModel (idClipModel *model, float density, int id=0, bool freeOld=true)
 
idClipModelGetClipModel (int id=0) const
 
int GetNumClipModels (void) const
 
void SetMass (float mass, int id=-1)
 
float GetMass (int id=-1) const
 
void SetContents (int contents, int id=-1)
 
int GetContents (int id=-1) const
 
const idBoundsGetBounds (int id=-1) const
 
const idBoundsGetAbsBounds (int id=-1) const
 
bool IsPushable (void) const
 
const idVec3GetOrigin (int id=0) const
 
const idMat3GetAxis (int id=0) const
 
void SetGravity (const idVec3 &newGravity)
 
const idMat3GetGravityAxis (void) const
 
void ClipTranslation (trace_t &results, const idVec3 &translation, const idClipModel *model) const
 
void ClipRotation (trace_t &results, const idRotation &rotation, const idClipModel *model) const
 
int ClipContents (const idClipModel *model) const
 
void DisableClip (void)
 
void EnableClip (void)
 
void UnlinkClip (void)
 
void LinkClip (void)
 
bool EvaluateContacts (void)
 
- Public Member Functions inherited from idPhysics_Base
 CLASS_PROTOTYPE (idPhysics_Base)
 
 idPhysics_Base (void)
 
 ~idPhysics_Base (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
void SetSelf (idEntity *e)
 
void SetClipModel (idClipModel *model, float density, int id=0, bool freeOld=true)
 
idClipModelGetClipModel (int id=0) const
 
int GetNumClipModels (void) const
 
void SetMass (float mass, int id=-1)
 
float GetMass (int id=-1) const
 
void SetContents (int contents, int id=-1)
 
int GetContents (int id=-1) const
 
void SetClipMask (int mask, int id=-1)
 
int GetClipMask (int id=-1) const
 
const idBoundsGetBounds (int id=-1) const
 
const idBoundsGetAbsBounds (int id=-1) const
 
void AddForce (const int id, const idVec3 &point, const idVec3 &force)
 
bool IsPushable (void) const
 
const idVec3GetOrigin (int id=0) const
 
const idMat3GetAxis (int id=0) const
 
void SetAngularVelocity (const idVec3 &newAngularVelocity, int id=0)
 
const idVec3GetAngularVelocity (int id=0) const
 
void SetGravity (const idVec3 &newGravity)
 
const idVec3GetGravity (void) const
 
const idVec3GetGravityNormal (void) const
 
void ClipTranslation (trace_t &results, const idVec3 &translation, const idClipModel *model) const
 
void ClipRotation (trace_t &results, const idRotation &rotation, const idClipModel *model) const
 
int ClipContents (const idClipModel *model) const
 
void DisableClip (void)
 
void EnableClip (void)
 
void UnlinkClip (void)
 
void LinkClip (void)
 
bool EvaluateContacts (void)
 
int GetNumContacts (void) const
 
const contactInfo_tGetContact (int num) const
 
void ClearContacts (void)
 
void AddContactEntity (idEntity *e)
 
void RemoveContactEntity (idEntity *e)
 
bool HasGroundContacts (void) const
 
bool IsGroundEntity (int entityNum) const
 
bool IsGroundClipModel (int entityNum, int id) const
 
const idVec3GetPushedAngularVelocity (const int id=0) const
 
const trace_tGetBlockingInfo (void) const
 
idEntityGetBlockingEntity (void) const
 
int GetLinearEndTime (void) const
 
int GetAngularEndTime (void) const
 
- Public Member Functions inherited from idPhysics
 ABSTRACT_PROTOTYPE (idPhysics)
 
virtual ~idPhysics (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
virtual void SetClipBox (const idBounds &bounds, float density)
 
- Public Member Functions inherited from idClass
 ABSTRACT_PROTOTYPE (idClass)
 
voidoperator new (size_t)
 
voidoperator new (size_t s, int, int, char *, int)
 
void operator delete (void *)
 
void operator delete (void *, int, int, char *, int)
 
virtual ~idClass ()
 
void Spawn (void)
 
void CallSpawn (void)
 
bool IsType (const idTypeInfo &c) const
 
const char * GetClassname (void) const
 
const char * GetSuperclass (void) const
 
void FindUninitializedMemory (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
bool RespondsTo (const idEventDef &ev) const
 
bool PostEventMS (const idEventDef *ev, int time)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8)
 
bool PostEventSec (const idEventDef *ev, float time)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8)
 
bool ProcessEvent (const idEventDef *ev)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8)
 
bool ProcessEventArgPtr (const idEventDef *ev, int *data)
 
void CancelEvents (const idEventDef *ev)
 
void Event_Remove (void)
 

Private Member Functions

void CheckGround (monsterPState_t &state)
 
monsterMoveResult_t SlideMove (idVec3 &start, idVec3 &velocity, const idVec3 &delta)
 
monsterMoveResult_t StepMove (idVec3 &start, idVec3 &velocity, const idVec3 &delta)
 
void Rest (void)
 

Private Attributes

monsterPState_t current
 
monsterPState_t saved
 
float maxStepHeight
 
float minFloorCosine
 
idVec3 delta
 
bool forceDeltaMove
 
bool fly
 
bool useVelocityMove
 
bool noImpact
 
monsterMoveResult_t moveResult
 
idEntityblockingEntity
 

Additional Inherited Members

- Static Public Member Functions inherited from idPhysics
static int SnapTimeToPhysicsFrame (int t)
 
- Static Public Member Functions inherited from idClass
static void Init (void)
 
static void Shutdown (void)
 
static idTypeInfoGetClass (const char *name)
 
static void DisplayInfo_f (const idCmdArgs &args)
 
static void ListClasses_f (const idCmdArgs &args)
 
static idClassCreateInstance (const char *name)
 
static int GetNumTypes (void)
 
static int GetTypeNumBits (void)
 
static idTypeInfoGetType (int num)
 
- Protected Member Functions inherited from idPhysics_Base
void AddGroundContacts (const idClipModel *clipModel)
 
void AddContactEntitiesForContacts (void)
 
void ActivateContactEntities (void)
 
bool IsOutsideWorld (void) const
 
void DrawVelocity (int id, float linearScale, float angularScale) const
 
- Protected Attributes inherited from idPhysics_Actor
idClipModelclipModel
 
idMat3 clipModelAxis
 
float mass
 
float invMass
 
idEntitymasterEntity
 
float masterYaw
 
float masterDeltaYaw
 
idEntityPtr< idEntitygroundEntityPtr
 
- Protected Attributes inherited from idPhysics_Base
idEntityself
 
int clipMask
 
idVec3 gravityVector
 
idVec3 gravityNormal
 
idList< contactInfo_tcontacts
 
idList< contactEntity_tcontactEntities
 

Detailed Description

Definition at line 60 of file Physics_Monster.h.

Constructor & Destructor Documentation

idPhysics_Monster::idPhysics_Monster ( void  )

Definition at line 250 of file Physics_Monster.cpp.

Member Function Documentation

void idPhysics_Monster::Activate ( void  )
virtual

Reimplemented from idPhysics_Base.

Definition at line 220 of file Physics_Monster.cpp.

void idPhysics_Monster::ApplyImpulse ( const int  id,
const idVec3 point,
const idVec3 impulse 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 579 of file Physics_Monster.cpp.

void idPhysics_Monster::CheckGround ( monsterPState_t state)
private

Definition at line 44 of file Physics_Monster.cpp.

idPhysics_Monster::CLASS_PROTOTYPE ( idPhysics_Monster  )
void idPhysics_Monster::DisableImpact ( void  )

Definition at line 439 of file Physics_Monster.cpp.

void idPhysics_Monster::EnableImpact ( void  )

Definition at line 430 of file Physics_Monster.cpp.

bool idPhysics_Monster::Evaluate ( int  timeStepMSec,
int  endTimeMSec 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 448 of file Physics_Monster.cpp.

void idPhysics_Monster::ForceDeltaMove ( bool  force)

Definition at line 403 of file Physics_Monster.cpp.

void idPhysics_Monster::GetImpactInfo ( const int  id,
const idVec3 point,
impactInfo_t info 
) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 567 of file Physics_Monster.cpp.

const idVec3 & idPhysics_Monster::GetLinearVelocity ( int  id = 0) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 707 of file Physics_Monster.cpp.

float idPhysics_Monster::GetMaxStepHeight ( void  ) const

Definition at line 367 of file Physics_Monster.cpp.

monsterMoveResult_t idPhysics_Monster::GetMoveResult ( void  ) const

Definition at line 394 of file Physics_Monster.cpp.

const idVec3 & idPhysics_Monster::GetPushedLinearVelocity ( const int  id = 0) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 726 of file Physics_Monster.cpp.

int idPhysics_Monster::GetRestStartTime ( void  ) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 601 of file Physics_Monster.cpp.

idEntity * idPhysics_Monster::GetSlideMoveEntity ( void  ) const

Definition at line 385 of file Physics_Monster.cpp.

int idPhysics_Monster::GetTime ( void  ) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 558 of file Physics_Monster.cpp.

bool idPhysics_Monster::IsAtRest ( void  ) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 592 of file Physics_Monster.cpp.

bool idPhysics_Monster::OnGround ( void  ) const

Definition at line 376 of file Physics_Monster.cpp.

void idPhysics_Monster::PutToRest ( void  )
virtual

Reimplemented from idPhysics_Base.

Definition at line 241 of file Physics_Monster.cpp.

void idPhysics_Monster::ReadFromSnapshot ( const idBitMsgDelta msg)
virtual

Reimplemented from idPhysics_Base.

Definition at line 791 of file Physics_Monster.cpp.

void idPhysics_Monster::Rest ( void  )
private

Definition at line 230 of file Physics_Monster.cpp.

void idPhysics_Monster::Restore ( idRestoreGame savefile)

Definition at line 323 of file Physics_Monster.cpp.

void idPhysics_Monster::RestoreState ( void  )
virtual

Reimplemented from idPhysics_Base.

Definition at line 619 of file Physics_Monster.cpp.

void idPhysics_Monster::Rotate ( const idRotation rotation,
int  id = -1 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 676 of file Physics_Monster.cpp.

void idPhysics_Monster::Save ( idSaveGame savefile) const

Definition at line 300 of file Physics_Monster.cpp.

void idPhysics_Monster::SaveState ( void  )
virtual

Reimplemented from idPhysics_Base.

Definition at line 610 of file Physics_Monster.cpp.

void idPhysics_Monster::SetAxis ( const idMat3 newAxis,
int  id = -1 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 653 of file Physics_Monster.cpp.

void idPhysics_Monster::SetDelta ( const idVec3 d)

Definition at line 346 of file Physics_Monster.cpp.

void idPhysics_Monster::SetLinearVelocity ( const idVec3 newLinearVelocity,
int  id = 0 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 697 of file Physics_Monster.cpp.

void idPhysics_Monster::SetMaster ( idEntity master,
const bool  orientated = true 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 737 of file Physics_Monster.cpp.

void idPhysics_Monster::SetMaxStepHeight ( const float  newMaxStepHeight)

Definition at line 358 of file Physics_Monster.cpp.

void idPhysics_Monster::SetMinFloorCosine ( const float  newMinFloorCosine)
void idPhysics_Monster::SetOrigin ( const idVec3 newOrigin,
int  id = -1 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 632 of file Physics_Monster.cpp.

void idPhysics_Monster::SetPushed ( int  deltaTime)
virtual

Reimplemented from idPhysics_Base.

Definition at line 716 of file Physics_Monster.cpp.

monsterMoveResult_t idPhysics_Monster::SlideMove ( idVec3 start,
idVec3 velocity,
const idVec3 delta 
)
private

Definition at line 90 of file Physics_Monster.cpp.

monsterMoveResult_t idPhysics_Monster::StepMove ( idVec3 start,
idVec3 velocity,
const idVec3 delta 
)
private

Definition at line 129 of file Physics_Monster.cpp.

void idPhysics_Monster::Translate ( const idVec3 translation,
int  id = -1 
)
virtual

Reimplemented from idPhysics_Base.

Definition at line 663 of file Physics_Monster.cpp.

void idPhysics_Monster::UpdateTime ( int  endTimeMSec)
virtual

Reimplemented from idPhysics_Base.

Definition at line 550 of file Physics_Monster.cpp.

void idPhysics_Monster::UseFlyMove ( bool  force)

Definition at line 412 of file Physics_Monster.cpp.

void idPhysics_Monster::UseVelocityMove ( bool  force)

Definition at line 421 of file Physics_Monster.cpp.

void idPhysics_Monster::WriteToSnapshot ( idBitMsgDelta msg) const
virtual

Reimplemented from idPhysics_Base.

Definition at line 769 of file Physics_Monster.cpp.

Member Data Documentation

idEntity* idPhysics_Monster::blockingEntity
private

Definition at line 143 of file Physics_Monster.h.

monsterPState_t idPhysics_Monster::current
private

Definition at line 128 of file Physics_Monster.h.

idVec3 idPhysics_Monster::delta
private

Definition at line 134 of file Physics_Monster.h.

bool idPhysics_Monster::fly
private

Definition at line 137 of file Physics_Monster.h.

bool idPhysics_Monster::forceDeltaMove
private

Definition at line 136 of file Physics_Monster.h.

float idPhysics_Monster::maxStepHeight
private

Definition at line 132 of file Physics_Monster.h.

float idPhysics_Monster::minFloorCosine
private

Definition at line 133 of file Physics_Monster.h.

monsterMoveResult_t idPhysics_Monster::moveResult
private

Definition at line 142 of file Physics_Monster.h.

bool idPhysics_Monster::noImpact
private

Definition at line 139 of file Physics_Monster.h.

monsterPState_t idPhysics_Monster::saved
private

Definition at line 129 of file Physics_Monster.h.

bool idPhysics_Monster::useVelocityMove
private

Definition at line 138 of file Physics_Monster.h.


The documentation for this class was generated from the following files: