C# Class idTech4.Game.Physics.idPhysics_Base

Physics base for a moving object using one or more collision models.
Inheritance: idPhysics
显示文件 Open project: iainmckay/idtech4.net

Protected Properties

Property Type Description
_clipMask ContentFlags
_contactEntities List
_contacts List
_gravityNormal Vector3
_gravityVector Vector3
_self idEntity

Public Methods

Method Description
Activate ( ) : void
AddContactEntity ( idEntity entity ) : void
AddForce ( int id, Vector3 point, Vector3 force ) : void
ApplyImpulse ( int id, Vector3 point, Vector3 impulse ) : void
ClearContacts ( ) : void
ClipContents ( idClipModel model ) : ContentFlags
ClipRotation ( idRotation rotation, idClipModel model ) : TraceResult
ClipTranslation ( Vector3 translation, idClipModel model ) : TraceResult
DisableClip ( ) : void
EnableClip ( ) : void
Evaluate ( int timeStep, int endTime ) : bool
EvaluateContacts ( ) : bool
GetAbsoluteBounds ( int id = -1 ) : idBounds
GetAngularVelocity ( int id ) : Vector3
GetAxis ( int id ) : Matrix
GetBounds ( int id = -1 ) : idBounds
GetClipMask ( int id = -1 ) : ContentFlags
GetClipModel ( int id ) : idClipModel
GetContact ( int index ) : ContactInfo
GetContents ( int id = -1 ) : ContentFlags
GetImpactInfo ( int id, Vector3 point ) : ImpactInfo
GetLinearVelocity ( int id ) : Vector3
GetMass ( int id = -1 ) : float
GetOrigin ( int id ) : Vector3
GetPushedAngularVelocity ( int id ) : Vector3
GetPushedLinearVelocity ( int id ) : Vector3
IsGroundClipModel ( int index, int id ) : bool
IsGroundEntity ( int index ) : bool
LinkClip ( ) : void
PutToRest ( ) : void
ReadFromSnapshot ( idBitMsgDelta msg ) : void
RemoveContactEntity ( idEntity entity ) : void
Restore ( object saveFile ) : void
RestoreState ( ) : void
Rotate ( idRotation rotation, int id = 1 ) : void
Save ( object saveFile ) : void
SaveState ( ) : void
SetAngularVelocity ( Vector3 velocity, int id ) : void
SetAxis ( Matrix axis, int id = -1 ) : void
SetClipMask ( ContentFlags mask, int id = -1 ) : void
SetClipModel ( idClipModel model, float density, int id, bool disposeOld = true ) : void
SetContents ( ContentFlags contents, int id = -1 ) : void
SetLinearVelocity ( Vector3 velocity, int id ) : void
SetMass ( float mass, int id = -1 ) : void
SetMaster ( idEntity master, bool orientated = true ) : void
SetOrigin ( Vector3 origin, int id = -1 ) : void
SetPushed ( int deltaTime ) : void
Translate ( Vector3 translation, int id = -1 ) : void
UnlinkClip ( ) : void
UpdateTime ( int endTime ) : void
WriteToSnapshot ( idBitMsgDelta msg ) : void
idPhysics_Base ( ) : System

Protected Methods

Method Description
ActivateContactEntities ( ) : void

Active all contact entities.

AddContactEntitiesForContacts ( ) : void

Add contact entity links to contact entities.

AddGroundContacts ( idClipModel clipModel ) : void
AddGroupContacts ( idClipModel clipModel ) : void

Add ground contacts for the clip model.

Dispose ( bool disposing ) : void
DrawVelocity ( int id, float linearScale, float angularScale ) : void

Draw linear and angular velocity.

Method Details

Activate() public method

public Activate ( ) : void
return void

ActivateContactEntities() protected method

Active all contact entities.
protected ActivateContactEntities ( ) : void
return void

AddContactEntitiesForContacts() protected method

Add contact entity links to contact entities.
protected AddContactEntitiesForContacts ( ) : void
return void

AddContactEntity() public method

public AddContactEntity ( idEntity entity ) : void
entity idEntity
return void

AddForce() public method

public AddForce ( int id, Vector3 point, Vector3 force ) : void
id int
point Vector3
force Vector3
return void

AddGroundContacts() protected method

protected AddGroundContacts ( idClipModel clipModel ) : void
clipModel idClipModel
return void

AddGroupContacts() protected method

Add ground contacts for the clip model.
protected AddGroupContacts ( idClipModel clipModel ) : void
clipModel idClipModel
return void

ApplyImpulse() public method

public ApplyImpulse ( int id, Vector3 point, Vector3 impulse ) : void
id int
point Vector3
impulse Vector3
return void

ClearContacts() public method

public ClearContacts ( ) : void
return void

ClipContents() public method

public ClipContents ( idClipModel model ) : ContentFlags
model idClipModel
return ContentFlags

ClipRotation() public method

public ClipRotation ( idRotation rotation, idClipModel model ) : TraceResult
rotation idRotation
model idClipModel
return idTech4.Collision.TraceResult

ClipTranslation() public method

public ClipTranslation ( Vector3 translation, idClipModel model ) : TraceResult
translation Vector3
model idClipModel
return idTech4.Collision.TraceResult

DisableClip() public method

public DisableClip ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DrawVelocity() protected method

Draw linear and angular velocity.
protected DrawVelocity ( int id, float linearScale, float angularScale ) : void
id int
linearScale float
angularScale float
return void

EnableClip() public method

public EnableClip ( ) : void
return void

Evaluate() public method

public Evaluate ( int timeStep, int endTime ) : bool
timeStep int
endTime int
return bool

EvaluateContacts() public method

public EvaluateContacts ( ) : bool
return bool

GetAbsoluteBounds() public method

public GetAbsoluteBounds ( int id = -1 ) : idBounds
id int
return idBounds

GetAngularVelocity() public method

public GetAngularVelocity ( int id ) : Vector3
id int
return Vector3

GetAxis() public method

public GetAxis ( int id ) : Matrix
id int
return Matrix

GetBounds() public method

public GetBounds ( int id = -1 ) : idBounds
id int
return idBounds

GetClipMask() public method

public GetClipMask ( int id = -1 ) : ContentFlags
id int
return ContentFlags

GetClipModel() public method

public GetClipModel ( int id ) : idClipModel
id int
return idClipModel

GetContact() public method

public GetContact ( int index ) : ContactInfo
index int
return idTech4.Collision.ContactInfo

GetContents() public method

public GetContents ( int id = -1 ) : ContentFlags
id int
return ContentFlags

GetImpactInfo() public method

public GetImpactInfo ( int id, Vector3 point ) : ImpactInfo
id int
point Vector3
return ImpactInfo

GetLinearVelocity() public method

public GetLinearVelocity ( int id ) : Vector3
id int
return Vector3

GetMass() public method

public GetMass ( int id = -1 ) : float
id int
return float

GetOrigin() public method

public GetOrigin ( int id ) : Vector3
id int
return Vector3

GetPushedAngularVelocity() public method

public GetPushedAngularVelocity ( int id ) : Vector3
id int
return Vector3

GetPushedLinearVelocity() public method

public GetPushedLinearVelocity ( int id ) : Vector3
id int
return Vector3

IsGroundClipModel() public method

public IsGroundClipModel ( int index, int id ) : bool
index int
id int
return bool

IsGroundEntity() public method

public IsGroundEntity ( int index ) : bool
index int
return bool

LinkClip() public method

public LinkClip ( ) : void
return void

PutToRest() public method

public PutToRest ( ) : void
return void

ReadFromSnapshot() public method

public ReadFromSnapshot ( idBitMsgDelta msg ) : void
msg idBitMsgDelta
return void

RemoveContactEntity() public method

public RemoveContactEntity ( idEntity entity ) : void
entity idEntity
return void

Restore() public method

public Restore ( object saveFile ) : void
saveFile object
return void

RestoreState() public method

public RestoreState ( ) : void
return void

Rotate() public method

public Rotate ( idRotation rotation, int id = 1 ) : void
rotation idRotation
id int
return void

Save() public method

public Save ( object saveFile ) : void
saveFile object
return void

SaveState() public method

public SaveState ( ) : void
return void

SetAngularVelocity() public method

public SetAngularVelocity ( Vector3 velocity, int id ) : void
velocity Vector3
id int
return void

SetAxis() public method

public SetAxis ( Matrix axis, int id = -1 ) : void
axis Matrix
id int
return void

SetClipMask() public method

public SetClipMask ( ContentFlags mask, int id = -1 ) : void
mask ContentFlags
id int
return void

SetClipModel() public method

public SetClipModel ( idClipModel model, float density, int id, bool disposeOld = true ) : void
model idClipModel
density float
id int
disposeOld bool
return void

SetContents() public method

public SetContents ( ContentFlags contents, int id = -1 ) : void
contents ContentFlags
id int
return void

SetLinearVelocity() public method

public SetLinearVelocity ( Vector3 velocity, int id ) : void
velocity Vector3
id int
return void

SetMass() public method

public SetMass ( float mass, int id = -1 ) : void
mass float
id int
return void

SetMaster() public method

public SetMaster ( idEntity master, bool orientated = true ) : void
master idEntity
orientated bool
return void

SetOrigin() public method

public SetOrigin ( Vector3 origin, int id = -1 ) : void
origin Vector3
id int
return void

SetPushed() public method

public SetPushed ( int deltaTime ) : void
deltaTime int
return void

Translate() public method

public Translate ( Vector3 translation, int id = -1 ) : void
translation Vector3
id int
return void

UnlinkClip() public method

public UnlinkClip ( ) : void
return void

UpdateTime() public method

public UpdateTime ( int endTime ) : void
endTime int
return void

WriteToSnapshot() public method

public WriteToSnapshot ( idBitMsgDelta msg ) : void
msg idBitMsgDelta
return void

idPhysics_Base() public method

public idPhysics_Base ( ) : System
return System

Property Details

_clipMask protected_oe property

protected ContentFlags _clipMask
return ContentFlags

_contactEntities protected_oe property

protected List _contactEntities
return List

_contacts protected_oe property

protected List _contacts
return List

_gravityNormal protected_oe property

protected Vector3 _gravityNormal
return Vector3

_gravityVector protected_oe property

protected Vector3 _gravityVector
return Vector3

_self protected_oe property

protected idEntity _self
return idEntity