C# 클래스 idTech4.Game.Physics.idPhysics

Physics abstract class.
A physics object is a tool to manipulate the position and orientation of an entity. The physics object is a container for idClipModels used for collision detection. The physics deals with moving these collision models through the world according to the laws of physics or other rules. The mass of a clip model is the volume of the clip model times the density. An arbitrary mass can however be set for specific clip models or the whole physics object. The contents of a clip model is a set of bit flags that define the contents. The clip mask defines the contents a clip model collides with. The linear velocity of a physics object is a vector that defines the translation of the center of mass in units per second. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of this vector defines the axis of rotation and the magnitude defines the rate of rotation about the axis in radians per second. The gravity is the change in velocity per second due to gravitational force. Entities update their visual position and orientation from the physics using GetOrigin() and GetAxis(). Direct origin and axis changes of entities should go through the physics. In other words the physics origin and axis are updated first and the entity updates it's visual position from the physics.
상속: IDisposable
파일 보기 프로젝트 열기: iainmckay/idtech4.net 1 사용 예제들

공개 메소드들

메소드 설명
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

Disable the clip models contained by this physics object.

Dispose ( ) : void
EnableClip ( ) : void

Enable the clip models contained by this physics object.

Evaluate ( int timeStep, int endTime ) : bool

Evaluate the physics with the given time step, returns true if the object moved.

EvaluateContacts ( ) : bool
GetAbsoluteBounds ( int id = -1 ) : idBounds

Get the bounds of a specific clip model or the whole physics object.

GetAngularVelocity ( int id ) : Vector3
GetAxis ( int id ) : Matrix
GetBounds ( int id = -1 ) : idBounds

Get the bounds of a specific clip model or the whole physics object.

GetClipMask ( int id = -1 ) : ContentFlags

Get the contents a specific clip model or the whole physics object collides with.

GetClipModel ( int id ) : idClipModel
GetContact ( int index ) : ContactInfo
GetContents ( int id = -1 ) : ContentFlags

Get the contents of a specific clip model or the whole physics object.

GetImpactInfo ( int id, Vector3 point ) : ImpactInfo
GetLinearVelocity ( int id ) : Vector3
GetMass ( int id = -1 ) : float

Get the mass of a specific clip model or the whole physics object.

GetOrigin ( int id ) : Vector3
GetPushedAngularVelocity ( int id ) : Vector3
GetPushedLinearVelocity ( int id ) : Vector3
IsGroundClipModel ( int index, int id ) : bool
IsGroundEntity ( int index ) : bool
LinkClip ( ) : void

Link the clip models contained by this physics object.

PutToRest ( ) : void
ReadFromSnapshot ( idBitMsgDelta msg ) : void
RemoveContactEntity ( idEntity entity ) : void
Restore ( object saveFile ) : void
RestoreState ( ) : void
Rotate ( idRotation rotation, int id = 1 ) : void

Rotate the physics object in world space.

Save ( object saveFile ) : void
SaveState ( ) : void
SetAngularVelocity ( Vector3 velocity, int id ) : void
SetAxis ( Matrix axis, int id = -1 ) : void

Set the orientation in master space or world space if no master set.

SetClipBox ( idBounds bounds, float density ) : void
SetClipMask ( ContentFlags mask, int id = -1 ) : void

Set the contents a specific clip model or the whole physics object collides with.

SetClipModel ( idClipModel model, float density, int id, bool disposeOld = true ) : void
SetContents ( ContentFlags contents, int id = -1 ) : void

Set the contents of a specific clip model or the whole physics object.

SetLinearVelocity ( Vector3 velocity, int id ) : void
SetMass ( float mass, int id = -1 ) : void

Set the mass of a specific clip model or the whole physics object.

SetMaster ( idEntity master, bool orientated = true ) : void
SetOrigin ( Vector3 origin, int id = -1 ) : void

Set the position in master space or world space if no master set.

SetPushed ( int deltaTime ) : void
SnapTimeToPhysicsFrame ( int t ) : int
Translate ( Vector3 translation, int id = -1 ) : void

Translate the physics object in world space.

UnlinkClip ( ) : void

Unlink the clip models contained by this physics object.

UpdateTime ( int endTime ) : void

Update the time without moving.

WriteToSnapshot ( idBitMsgDelta msg ) : void
idPhysics ( ) : System

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

메소드 상세

Activate() 공개 추상적인 메소드

public abstract Activate ( ) : void
리턴 void

AddContactEntity() 공개 추상적인 메소드

public abstract AddContactEntity ( idEntity entity ) : void
entity idEntity
리턴 void

AddForce() 공개 추상적인 메소드

public abstract AddForce ( int id, Vector3 point, Vector3 force ) : void
id int
point Vector3
force Vector3
리턴 void

ApplyImpulse() 공개 추상적인 메소드

public abstract ApplyImpulse ( int id, Vector3 point, Vector3 impulse ) : void
id int
point Vector3
impulse Vector3
리턴 void

ClearContacts() 공개 추상적인 메소드

public abstract ClearContacts ( ) : void
리턴 void

ClipContents() 공개 추상적인 메소드

public abstract ClipContents ( idClipModel model ) : ContentFlags
model idClipModel
리턴 ContentFlags

ClipRotation() 공개 추상적인 메소드

public abstract ClipRotation ( idRotation rotation, idClipModel model ) : TraceResult
rotation idRotation
model idClipModel
리턴 idTech4.Collision.TraceResult

ClipTranslation() 공개 추상적인 메소드

public abstract ClipTranslation ( Vector3 translation, idClipModel model ) : TraceResult
translation Vector3
model idClipModel
리턴 idTech4.Collision.TraceResult

DisableClip() 공개 추상적인 메소드

Disable the clip models contained by this physics object.
public abstract DisableClip ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

EnableClip() 공개 추상적인 메소드

Enable the clip models contained by this physics object.
public abstract EnableClip ( ) : void
리턴 void

Evaluate() 공개 추상적인 메소드

Evaluate the physics with the given time step, returns true if the object moved.
public abstract Evaluate ( int timeStep, int endTime ) : bool
timeStep int
endTime int
리턴 bool

EvaluateContacts() 공개 추상적인 메소드

public abstract EvaluateContacts ( ) : bool
리턴 bool

GetAbsoluteBounds() 공개 추상적인 메소드

Get the bounds of a specific clip model or the whole physics object.
public abstract GetAbsoluteBounds ( int id = -1 ) : idBounds
id int
리턴 idBounds

GetAngularVelocity() 공개 추상적인 메소드

public abstract GetAngularVelocity ( int id ) : Vector3
id int
리턴 Vector3

GetAxis() 공개 추상적인 메소드

public abstract GetAxis ( int id ) : Matrix
id int
리턴 Matrix

GetBounds() 공개 추상적인 메소드

Get the bounds of a specific clip model or the whole physics object.
public abstract GetBounds ( int id = -1 ) : idBounds
id int
리턴 idBounds

GetClipMask() 공개 추상적인 메소드

Get the contents a specific clip model or the whole physics object collides with.
public abstract GetClipMask ( int id = -1 ) : ContentFlags
id int
리턴 ContentFlags

GetClipModel() 공개 추상적인 메소드

public abstract GetClipModel ( int id ) : idClipModel
id int
리턴 idClipModel

GetContact() 공개 추상적인 메소드

public abstract GetContact ( int index ) : ContactInfo
index int
리턴 idTech4.Collision.ContactInfo

GetContents() 공개 추상적인 메소드

Get the contents of a specific clip model or the whole physics object.
public abstract GetContents ( int id = -1 ) : ContentFlags
id int
리턴 ContentFlags

GetImpactInfo() 공개 추상적인 메소드

public abstract GetImpactInfo ( int id, Vector3 point ) : ImpactInfo
id int
point Vector3
리턴 ImpactInfo

GetLinearVelocity() 공개 추상적인 메소드

public abstract GetLinearVelocity ( int id ) : Vector3
id int
리턴 Vector3

GetMass() 공개 추상적인 메소드

Get the mass of a specific clip model or the whole physics object.
public abstract GetMass ( int id = -1 ) : float
id int
리턴 float

GetOrigin() 공개 추상적인 메소드

public abstract GetOrigin ( int id ) : Vector3
id int
리턴 Vector3

GetPushedAngularVelocity() 공개 추상적인 메소드

public abstract GetPushedAngularVelocity ( int id ) : Vector3
id int
리턴 Vector3

GetPushedLinearVelocity() 공개 추상적인 메소드

public abstract GetPushedLinearVelocity ( int id ) : Vector3
id int
리턴 Vector3

IsGroundClipModel() 공개 추상적인 메소드

public abstract IsGroundClipModel ( int index, int id ) : bool
index int
id int
리턴 bool

IsGroundEntity() 공개 추상적인 메소드

public abstract IsGroundEntity ( int index ) : bool
index int
리턴 bool

LinkClip() 공개 추상적인 메소드

Link the clip models contained by this physics object.
public abstract LinkClip ( ) : void
리턴 void

PutToRest() 공개 추상적인 메소드

public abstract PutToRest ( ) : void
리턴 void

ReadFromSnapshot() 공개 추상적인 메소드

public abstract ReadFromSnapshot ( idBitMsgDelta msg ) : void
msg idBitMsgDelta
리턴 void

RemoveContactEntity() 공개 추상적인 메소드

public abstract RemoveContactEntity ( idEntity entity ) : void
entity idEntity
리턴 void

Restore() 공개 메소드

public Restore ( object saveFile ) : void
saveFile object
리턴 void

RestoreState() 공개 추상적인 메소드

public abstract RestoreState ( ) : void
리턴 void

Rotate() 공개 추상적인 메소드

Rotate the physics object in world space.
public abstract Rotate ( idRotation rotation, int id = 1 ) : void
rotation idRotation
id int
리턴 void

Save() 공개 메소드

public Save ( object saveFile ) : void
saveFile object
리턴 void

SaveState() 공개 추상적인 메소드

public abstract SaveState ( ) : void
리턴 void

SetAngularVelocity() 공개 추상적인 메소드

public abstract SetAngularVelocity ( Vector3 velocity, int id ) : void
velocity Vector3
id int
리턴 void

SetAxis() 공개 추상적인 메소드

Set the orientation in master space or world space if no master set.
public abstract SetAxis ( Matrix axis, int id = -1 ) : void
axis Matrix
id int
리턴 void

SetClipBox() 공개 메소드

public SetClipBox ( idBounds bounds, float density ) : void
bounds idBounds
density float
리턴 void

SetClipMask() 공개 추상적인 메소드

Set the contents a specific clip model or the whole physics object collides with.
public abstract SetClipMask ( ContentFlags mask, int id = -1 ) : void
mask ContentFlags
id int
리턴 void

SetClipModel() 공개 추상적인 메소드

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

SetContents() 공개 추상적인 메소드

Set the contents of a specific clip model or the whole physics object.
public abstract SetContents ( ContentFlags contents, int id = -1 ) : void
contents ContentFlags
id int
리턴 void

SetLinearVelocity() 공개 추상적인 메소드

public abstract SetLinearVelocity ( Vector3 velocity, int id ) : void
velocity Vector3
id int
리턴 void

SetMass() 공개 추상적인 메소드

Set the mass of a specific clip model or the whole physics object.
public abstract SetMass ( float mass, int id = -1 ) : void
mass float
id int
리턴 void

SetMaster() 공개 추상적인 메소드

public abstract SetMaster ( idEntity master, bool orientated = true ) : void
master idEntity
orientated bool
리턴 void

SetOrigin() 공개 추상적인 메소드

Set the position in master space or world space if no master set.
public abstract SetOrigin ( Vector3 origin, int id = -1 ) : void
origin Vector3
id int
리턴 void

SetPushed() 공개 추상적인 메소드

public abstract SetPushed ( int deltaTime ) : void
deltaTime int
리턴 void

SnapTimeToPhysicsFrame() 공개 정적인 메소드

public static SnapTimeToPhysicsFrame ( int t ) : int
t int
리턴 int

Translate() 공개 추상적인 메소드

Translate the physics object in world space.
public abstract Translate ( Vector3 translation, int id = -1 ) : void
translation Vector3
id int
리턴 void

UnlinkClip() 공개 추상적인 메소드

Unlink the clip models contained by this physics object.
public abstract UnlinkClip ( ) : void
리턴 void

UpdateTime() 공개 추상적인 메소드

Update the time without moving.
public abstract UpdateTime ( int endTime ) : void
endTime int
리턴 void

WriteToSnapshot() 공개 추상적인 메소드

public abstract WriteToSnapshot ( idBitMsgDelta msg ) : void
msg idBitMsgDelta
리턴 void

idPhysics() 공개 메소드

public idPhysics ( ) : System
리턴 System