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

#include <BrittleFracture.h>

Inheritance diagram for idBrittleFracture:
idEntity idClass

Public Types

enum  { EVENT_PROJECT_DECAL = idEntity::EVENT_MAXEVENTS, EVENT_SHATTER, EVENT_MAXEVENTS }
 
- Public Types inherited from idEntity
enum  { EVENT_STARTSOUNDSHADER, EVENT_STOPSOUNDSHADER, EVENT_MAXEVENTS }
 

Public Member Functions

 CLASS_PROTOTYPE (idBrittleFracture)
 
 idBrittleFracture (void)
 
virtual ~idBrittleFracture (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
void Spawn (void)
 
virtual void Present (void)
 
virtual void Think (void)
 
virtual void ApplyImpulse (idEntity *ent, int id, const idVec3 &point, const idVec3 &impulse)
 
virtual void AddForce (idEntity *ent, int id, const idVec3 &point, const idVec3 &force)
 
virtual void AddDamageEffect (const trace_t &collision, const idVec3 &velocity, const char *damageDefName)
 
virtual void Killed (idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
 
void ProjectDecal (const idVec3 &point, const idVec3 &dir, const int time, const char *damageDefName)
 
bool IsBroken (void) const
 
virtual void ClientPredictionThink (void)
 
virtual bool ClientReceiveEvent (int event, int time, const idBitMsg &msg)
 
- Public Member Functions inherited from idEntity
 ABSTRACT_PROTOTYPE (idEntity)
 
 idEntity ()
 
 ~idEntity ()
 
void Spawn (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
const char * GetEntityDefName (void) const
 
void SetName (const char *name)
 
const char * GetName (void) const
 
virtual void UpdateChangeableSpawnArgs (const idDict *source)
 
virtual renderView_tGetRenderView ()
 
bool CheckDormant (void)
 
virtual void DormantBegin (void)
 
virtual void DormantEnd (void)
 
bool IsActive (void) const
 
void BecomeActive (int flags)
 
void BecomeInactive (int flags)
 
void UpdatePVSAreas (const idVec3 &pos)
 
virtual renderEntity_tGetRenderEntity (void)
 
virtual int GetModelDefHandle (void)
 
virtual void SetModel (const char *modelname)
 
void SetSkin (const idDeclSkin *skin)
 
const idDeclSkinGetSkin (void) const
 
void SetShaderParm (int parmnum, float value)
 
virtual void SetColor (float red, float green, float blue)
 
virtual void SetColor (const idVec3 &color)
 
virtual void GetColor (idVec3 &out) const
 
virtual void SetColor (const idVec4 &color)
 
virtual void GetColor (idVec4 &out) const
 
virtual void FreeModelDef (void)
 
virtual void FreeLightDef (void)
 
virtual void Hide (void)
 
virtual void Show (void)
 
bool IsHidden (void) const
 
void UpdateVisuals (void)
 
void UpdateModel (void)
 
void UpdateModelTransform (void)
 
virtual void ProjectOverlay (const idVec3 &origin, const idVec3 &dir, float size, const char *material)
 
int GetNumPVSAreas (void)
 
const intGetPVSAreas (void)
 
void ClearPVSAreas (void)
 
bool PhysicsTeamInPVS (pvsHandle_t pvsHandle)
 
virtual bool UpdateAnimationControllers (void)
 
bool UpdateRenderEntity (renderEntity_s *renderEntity, const renderView_t *renderView)
 
virtual idAnimatorGetAnimator (void)
 
virtual bool CanPlayChatterSounds (void) const
 
bool StartSound (const char *soundName, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
 
bool StartSoundShader (const idSoundShader *shader, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
 
void StopSound (const s_channelType channel, bool broadcast)
 
void SetSoundVolume (float volume)
 
void UpdateSound (void)
 
int GetListenerId (void) const
 
idSoundEmitterGetSoundEmitter (void) const
 
void FreeSoundEmitter (bool immediate)
 
virtual void PreBind (void)
 
virtual void PostBind (void)
 
virtual void PreUnbind (void)
 
virtual void PostUnbind (void)
 
void JoinTeam (idEntity *teammember)
 
void Bind (idEntity *master, bool orientated)
 
void BindToJoint (idEntity *master, const char *jointname, bool orientated)
 
void BindToJoint (idEntity *master, jointHandle_t jointnum, bool orientated)
 
void BindToBody (idEntity *master, int bodyId, bool orientated)
 
void Unbind (void)
 
bool IsBound (void) const
 
bool IsBoundTo (idEntity *master) const
 
idEntityGetBindMaster (void) const
 
jointHandle_t GetBindJoint (void) const
 
int GetBindBody (void) const
 
idEntityGetTeamMaster (void) const
 
idEntityGetNextTeamEntity (void) const
 
void ConvertLocalToWorldTransform (idVec3 &offset, idMat3 &axis)
 
idVec3 GetLocalVector (const idVec3 &vec) const
 
idVec3 GetLocalCoordinates (const idVec3 &vec) const
 
idVec3 GetWorldVector (const idVec3 &vec) const
 
idVec3 GetWorldCoordinates (const idVec3 &vec) const
 
bool GetMasterPosition (idVec3 &masterOrigin, idMat3 &masterAxis) const
 
void GetWorldVelocities (idVec3 &linearVelocity, idVec3 &angularVelocity) const
 
void SetPhysics (idPhysics *phys)
 
idPhysicsGetPhysics (void) const
 
void RestorePhysics (idPhysics *phys)
 
bool RunPhysics (void)
 
void SetOrigin (const idVec3 &org)
 
void SetAxis (const idMat3 &axis)
 
void SetAngles (const idAngles &ang)
 
bool GetFloorPos (float max_dist, idVec3 &floorpos) const
 
virtual bool GetPhysicsToVisualTransform (idVec3 &origin, idMat3 &axis)
 
virtual bool GetPhysicsToSoundTransform (idVec3 &origin, idMat3 &axis)
 
virtual bool Collide (const trace_t &collision, const idVec3 &velocity)
 
virtual void GetImpactInfo (idEntity *ent, int id, const idVec3 &point, impactInfo_t *info)
 
virtual void ActivatePhysics (idEntity *ent)
 
virtual bool IsAtRest (void) const
 
virtual int GetRestStartTime (void) const
 
virtual void AddContactEntity (idEntity *ent)
 
virtual void RemoveContactEntity (idEntity *ent)
 
virtual bool CanDamage (const idVec3 &origin, idVec3 &damagePoint) const
 
virtual void Damage (idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location)
 
virtual void DamageFeedback (idEntity *victim, idEntity *inflictor, int &damage)
 
virtual bool Pain (idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
 
virtual bool ShouldConstructScriptObjectAtSpawn (void) const
 
virtual idThreadConstructScriptObject (void)
 
virtual void DeconstructScriptObject (void)
 
void SetSignal (signalNum_t signalnum, idThread *thread, const function_t *function)
 
void ClearSignal (idThread *thread, signalNum_t signalnum)
 
void ClearSignalThread (signalNum_t signalnum, idThread *thread)
 
bool HasSignal (signalNum_t signalnum) const
 
void Signal (signalNum_t signalnum)
 
void SignalEvent (idThread *thread, signalNum_t signalnum)
 
void TriggerGuis (void)
 
bool HandleGuiCommands (idEntity *entityGui, const char *cmds)
 
virtual bool HandleSingleGuiCommand (idEntity *entityGui, idLexer *src)
 
void FindTargets (void)
 
void RemoveNullTargets (void)
 
void ActivateTargets (idEntity *activator) const
 
virtual void Teleport (const idVec3 &origin, const idAngles &angles, idEntity *destination)
 
bool TouchTriggers (void) const
 
idCurve_Spline< idVec3 > * GetSpline (void) const
 
virtual void ShowEditingDialog (void)
 
virtual void WriteToSnapshot (idBitMsgDelta &msg) const
 
virtual void ReadFromSnapshot (const idBitMsgDelta &msg)
 
virtual bool ServerReceiveEvent (int event, int time, const idBitMsg &msg)
 
void WriteBindToSnapshot (idBitMsgDelta &msg) const
 
void ReadBindFromSnapshot (const idBitMsgDelta &msg)
 
void WriteColorToSnapshot (idBitMsgDelta &msg) const
 
void ReadColorFromSnapshot (const idBitMsgDelta &msg)
 
void WriteGUIToSnapshot (idBitMsgDelta &msg) const
 
void ReadGUIFromSnapshot (const idBitMsgDelta &msg)
 
void ServerSendEvent (int eventId, const idBitMsg *msg, bool saveEvent, int excludeClient) const
 
void ClientSendEvent (int eventId, const idBitMsg *msg) const
 
- 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

bool UpdateRenderEntity (renderEntity_s *renderEntity, const renderView_t *renderView) const
 
void AddShard (idClipModel *clipModel, idFixedWinding &w)
 
void RemoveShard (int index)
 
void DropShard (shard_t *shard, const idVec3 &point, const idVec3 &dir, const float impulse, const int time)
 
void Shatter (const idVec3 &point, const idVec3 &impulse, const int time)
 
void DropFloatingIslands (const idVec3 &point, const idVec3 &impulse, const int time)
 
void Break (void)
 
void Fracture_r (idFixedWinding &w)
 
void CreateFractures (const idRenderModel *renderModel)
 
void FindNeighbours (void)
 
void Event_Activate (idEntity *activator)
 
void Event_Touch (idEntity *other, trace_t *trace)
 

Static Private Member Functions

static bool ModelCallback (renderEntity_s *renderEntity, const renderView_t *renderView)
 

Private Attributes

const idMaterialmaterial
 
const idMaterialdecalMaterial
 
float decalSize
 
float maxShardArea
 
float maxShatterRadius
 
float minShatterRadius
 
float linearVelocityScale
 
float angularVelocityScale
 
float shardMass
 
float density
 
float friction
 
float bouncyness
 
idStr fxFracture
 
idPhysics_StaticMulti physicsObj
 
idList< shard_t * > shards
 
idBounds bounds
 
bool disableFracture
 
int lastRenderEntityUpdate
 
bool changed
 

Additional Inherited Members

- Static Public Member Functions inherited from idEntity
static bool ModelCallback (renderEntity_s *renderEntity, const renderView_t *renderView)
 
- 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)
 
- Public Attributes inherited from idEntity
int entityNumber
 
int entityDefNumber
 
idLinkList< idEntityspawnNode
 
idLinkList< idEntityactiveNode
 
idLinkList< idEntitysnapshotNode
 
int snapshotSequence
 
int snapshotBits
 
idStr name
 
idDict spawnArgs
 
idScriptObject scriptObject
 
int thinkFlags
 
int dormantStart
 
bool cinematic
 
renderView_trenderView
 
idEntitycameraTarget
 
idList< idEntityPtr< idEntity > > targets
 
int health
 
struct idEntity::entityFlags_s fl
 
- Static Public Attributes inherited from idEntity
static const int MAX_PVS_AREAS = 4
 
- Protected Attributes inherited from idEntity
renderEntity_t renderEntity
 
int modelDefHandle
 
refSound_t refSound
 

Detailed Description

Definition at line 55 of file BrittleFracture.h.

Member Enumeration Documentation

anonymous enum
Enumerator
EVENT_PROJECT_DECAL 
EVENT_SHATTER 
EVENT_MAXEVENTS 

Definition at line 78 of file BrittleFracture.h.

Constructor & Destructor Documentation

idBrittleFracture::idBrittleFracture ( void  )

Definition at line 50 of file BrittleFracture.cpp.

idBrittleFracture::~idBrittleFracture ( void  )
virtual

Definition at line 83 of file BrittleFracture.cpp.

Member Function Documentation

void idBrittleFracture::AddDamageEffect ( const trace_t collision,
const idVec3 velocity,
const char *  damageDefName 
)
virtual

Reimplemented from idEntity.

Definition at line 1028 of file BrittleFracture.cpp.

void idBrittleFracture::AddForce ( idEntity ent,
int  id,
const idVec3 point,
const idVec3 force 
)
virtual

Reimplemented from idEntity.

Definition at line 682 of file BrittleFracture.cpp.

void idBrittleFracture::AddShard ( idClipModel clipModel,
idFixedWinding w 
)
private

Definition at line 326 of file BrittleFracture.cpp.

void idBrittleFracture::ApplyImpulse ( idEntity ent,
int  id,
const idVec3 point,
const idVec3 impulse 
)
virtual

Reimplemented from idEntity.

Definition at line 664 of file BrittleFracture.cpp.

void idBrittleFracture::Break ( void  )
private

Definition at line 997 of file BrittleFracture.cpp.

idBrittleFracture::CLASS_PROTOTYPE ( idBrittleFracture  )
void idBrittleFracture::ClientPredictionThink ( void  )
virtual

Reimplemented from idEntity.

Definition at line 1337 of file BrittleFracture.cpp.

bool idBrittleFracture::ClientReceiveEvent ( int  event,
int  time,
const idBitMsg msg 
)
virtual

Reimplemented from idEntity.

Definition at line 1351 of file BrittleFracture.cpp.

void idBrittleFracture::CreateFractures ( const idRenderModel renderModel)
private

Definition at line 1122 of file BrittleFracture.cpp.

void idBrittleFracture::DropFloatingIslands ( const idVec3 point,
const idVec3 impulse,
const int  time 
)
private

Definition at line 923 of file BrittleFracture.cpp.

void idBrittleFracture::DropShard ( shard_t shard,
const idVec3 point,
const idVec3 dir,
const float  impulse,
const int  time 
)
private

Definition at line 803 of file BrittleFracture.cpp.

void idBrittleFracture::Event_Activate ( idEntity activator)
private

Definition at line 1303 of file BrittleFracture.cpp.

void idBrittleFracture::Event_Touch ( idEntity other,
trace_t trace 
)
private

Definition at line 1315 of file BrittleFracture.cpp.

void idBrittleFracture::FindNeighbours ( void  )
private

Definition at line 1216 of file BrittleFracture.cpp.

void idBrittleFracture::Fracture_r ( idFixedWinding w)
private

Definition at line 1039 of file BrittleFracture.cpp.

bool idBrittleFracture::IsBroken ( void  ) const

Definition at line 1007 of file BrittleFracture.cpp.

void idBrittleFracture::Killed ( idEntity inflictor,
idEntity attacker,
int  damage,
const idVec3 dir,
int  location 
)
virtual

Reimplemented from idEntity.

Definition at line 1016 of file BrittleFracture.cpp.

bool idBrittleFracture::ModelCallback ( renderEntity_s renderEntity,
const renderView_t renderView 
)
staticprivate

Definition at line 546 of file BrittleFracture.cpp.

void idBrittleFracture::Present ( void  )
virtual

Reimplemented from idEntity.

Definition at line 562 of file BrittleFracture.cpp.

void idBrittleFracture::ProjectDecal ( const idVec3 point,
const idVec3 dir,
const int  time,
const char *  damageDefName 
)

Definition at line 700 of file BrittleFracture.cpp.

void idBrittleFracture::RemoveShard ( int  index)
private

Definition at line 343 of file BrittleFracture.cpp.

void idBrittleFracture::Restore ( idRestoreGame savefile)

Definition at line 170 of file BrittleFracture.cpp.

void idBrittleFracture::Save ( idSaveGame savefile) const

Definition at line 101 of file BrittleFracture.cpp.

void idBrittleFracture::Shatter ( const idVec3 point,
const idVec3 impulse,
const int  time 
)
private

Definition at line 865 of file BrittleFracture.cpp.

void idBrittleFracture::Spawn ( void  )

Definition at line 261 of file BrittleFracture.cpp.

void idBrittleFracture::Think ( void  )
virtual

Reimplemented from idEntity.

Definition at line 592 of file BrittleFracture.cpp.

bool idBrittleFracture::UpdateRenderEntity ( renderEntity_s renderEntity,
const renderView_t renderView 
) const
private

Definition at line 360 of file BrittleFracture.cpp.

Member Data Documentation

float idBrittleFracture::angularVelocityScale
private

Definition at line 96 of file BrittleFracture.h.

float idBrittleFracture::bouncyness
private

Definition at line 100 of file BrittleFracture.h.

idBounds idBrittleFracture::bounds
private

Definition at line 110 of file BrittleFracture.h.

bool idBrittleFracture::changed
mutableprivate

Definition at line 115 of file BrittleFracture.h.

const idMaterial* idBrittleFracture::decalMaterial
private

Definition at line 90 of file BrittleFracture.h.

float idBrittleFracture::decalSize
private

Definition at line 91 of file BrittleFracture.h.

float idBrittleFracture::density
private

Definition at line 98 of file BrittleFracture.h.

bool idBrittleFracture::disableFracture
private

Definition at line 111 of file BrittleFracture.h.

float idBrittleFracture::friction
private

Definition at line 99 of file BrittleFracture.h.

idStr idBrittleFracture::fxFracture
private

Definition at line 101 of file BrittleFracture.h.

int idBrittleFracture::lastRenderEntityUpdate
mutableprivate

Definition at line 114 of file BrittleFracture.h.

float idBrittleFracture::linearVelocityScale
private

Definition at line 95 of file BrittleFracture.h.

const idMaterial* idBrittleFracture::material
private

Definition at line 89 of file BrittleFracture.h.

float idBrittleFracture::maxShardArea
private

Definition at line 92 of file BrittleFracture.h.

float idBrittleFracture::maxShatterRadius
private

Definition at line 93 of file BrittleFracture.h.

float idBrittleFracture::minShatterRadius
private

Definition at line 94 of file BrittleFracture.h.

idPhysics_StaticMulti idBrittleFracture::physicsObj
private

Definition at line 108 of file BrittleFracture.h.

float idBrittleFracture::shardMass
private

Definition at line 97 of file BrittleFracture.h.

idList<shard_t *> idBrittleFracture::shards
private

Definition at line 109 of file BrittleFracture.h.


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