C# 클래스 Project290.Physics.Dynamics.Body

상속: IDisposable
파일 보기 프로젝트 열기: scastle/Solitude 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ControllerFilter ControllerFilter
PhysicsLogicFilter PhysicsLogicFilter

공개 메소드들

메소드 설명
ApplyAngularImpulse ( float impulse ) : void

Apply an angular impulse.

ApplyForce ( Vector2 &force ) : void

Applies a force at the center of mass.

ApplyForce ( Vector2 force, Vector2 point ) : void

Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body.

ApplyLinearImpulse ( Vector2 impulse ) : void

Apply an impulse at a point. This immediately modifies the velocity. This wakes up the body.

ApplyLinearImpulse ( Vector2 impulse, Vector2 point ) : void

Apply an impulse at a point. This immediately modifies the velocity. It also modifies the angular velocity if the point of application is not at the center of mass. This wakes up the body.

ApplyTorque ( float torque ) : void

Apply a torque. This affects the angular velocity without affecting the linear velocity of the center of mass. This wakes up the body.

Body ( World world ) : System
Body ( World world, Object userData ) : System
CreateFixture ( Shape shape ) : Fixture

Creates a fixture and attach it to this body. If the density is non-zero, this function automatically updates the mass of the body. Contacts are not created until the next time step. Warning: This function is locked during callbacks.

CreateFixture ( Shape shape, Object userData ) : Fixture

Creates a fixture and attach it to this body. If the density is non-zero, this function automatically updates the mass of the body. Contacts are not created until the next time step. Warning: This function is locked during callbacks.

DestroyFixture ( Fixture fixture ) : void

Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts associated with this fixture. This will automatically adjust the mass of the body if the body is dynamic and the fixture has positive density. All fixtures attached to a body are implicitly destroyed when the body is destroyed. Warning: This function is locked during callbacks.

Dispose ( ) : void
GetLinearVelocityFromLocalPoint ( Vector2 localPoint ) : Vector2

Get the world velocity of a local point.

GetLinearVelocityFromWorldPoint ( Vector2 worldPoint ) : Vector2

Get the world linear velocity of a world point attached to this body.

GetLocalPoint ( Vector2 &worldPoint ) : Vector2

Gets a local point relative to the body's origin given a world point. Note that the vector only takes the rotation into account, not the position.

GetLocalVector ( Vector2 &worldVector ) : Vector2

Gets a local vector given a world vector. Note that the vector only takes the rotation into account, not the position.

GetTransform ( Transform &transform ) : void

Get the body transform for the body's origin.

GetWorldPoint ( Vector2 &localPoint ) : Vector2

Get the world coordinates of a point given the local coordinates.

GetWorldVector ( Vector2 &localVector ) : Vector2

Get the world coordinates of a vector given the local coordinates. Note that the vector only takes the rotation into account, not the position.

ResetDynamics ( ) : void

Resets the dynamics of this body. Sets torque, force and linear/angular velocity to 0

ResetMassData ( ) : void

This resets the mass properties to the sum of the mass properties of the fixtures. This normally does not need to be called unless you called SetMassData to override the mass and you later want to reset the mass.

SetTransform ( Vector2 &position, float rotation ) : void

Set the position of the body's origin and rotation. This breaks any contacts and wakes the other bodies. Manipulating a body's transform may cause non-physical behavior.

SetTransformIgnoreContacts ( Vector2 &position, float angle ) : void

For teleporting a body without considering new contacts immediately.

비공개 메소드들

메소드 설명
Advance ( float alpha ) : void
ShouldCollide ( Body other ) : bool

This is used to prevent connected bodies from colliding. It may lie, depending on the collideConnected flag.

SynchronizeFixtures ( ) : void
SynchronizeTransform ( ) : void

메소드 상세

ApplyAngularImpulse() 공개 메소드

Apply an angular impulse.
public ApplyAngularImpulse ( float impulse ) : void
impulse float The angular impulse in units of kg*m*m/s.
리턴 void

ApplyForce() 공개 메소드

Applies a force at the center of mass.
public ApplyForce ( Vector2 &force ) : void
force Vector2 The force.
리턴 void

ApplyForce() 공개 메소드

Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body.
public ApplyForce ( Vector2 force, Vector2 point ) : void
force Vector2 The world force vector, usually in Newtons (N).
point Vector2 The world position of the point of application.
리턴 void

ApplyLinearImpulse() 공개 메소드

Apply an impulse at a point. This immediately modifies the velocity. This wakes up the body.
public ApplyLinearImpulse ( Vector2 impulse ) : void
impulse Vector2 The world impulse vector, usually in N-seconds or kg-m/s.
리턴 void

ApplyLinearImpulse() 공개 메소드

Apply an impulse at a point. This immediately modifies the velocity. It also modifies the angular velocity if the point of application is not at the center of mass. This wakes up the body.
public ApplyLinearImpulse ( Vector2 impulse, Vector2 point ) : void
impulse Vector2 The world impulse vector, usually in N-seconds or kg-m/s.
point Vector2 The world position of the point of application.
리턴 void

ApplyTorque() 공개 메소드

Apply a torque. This affects the angular velocity without affecting the linear velocity of the center of mass. This wakes up the body.
public ApplyTorque ( float torque ) : void
torque float The torque about the z-axis (out of the screen), usually in N-m.
리턴 void

Body() 공개 메소드

public Body ( World world ) : System
world World
리턴 System

Body() 공개 메소드

public Body ( World world, Object userData ) : System
world World
userData Object
리턴 System

CreateFixture() 공개 메소드

Creates a fixture and attach it to this body. If the density is non-zero, this function automatically updates the mass of the body. Contacts are not created until the next time step. Warning: This function is locked during callbacks.
public CreateFixture ( Shape shape ) : Fixture
shape Shape The shape.
리턴 Fixture

CreateFixture() 공개 메소드

Creates a fixture and attach it to this body. If the density is non-zero, this function automatically updates the mass of the body. Contacts are not created until the next time step. Warning: This function is locked during callbacks.
public CreateFixture ( Shape shape, Object userData ) : Fixture
shape Shape The shape.
userData Object Application specific data
리턴 Fixture

DestroyFixture() 공개 메소드

Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts associated with this fixture. This will automatically adjust the mass of the body if the body is dynamic and the fixture has positive density. All fixtures attached to a body are implicitly destroyed when the body is destroyed. Warning: This function is locked during callbacks.
public DestroyFixture ( Fixture fixture ) : void
fixture Fixture The fixture to be removed.
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetLinearVelocityFromLocalPoint() 공개 메소드

Get the world velocity of a local point.
public GetLinearVelocityFromLocalPoint ( Vector2 localPoint ) : Vector2
localPoint Vector2 A point in local coordinates.
리턴 Vector2

GetLinearVelocityFromWorldPoint() 공개 메소드

Get the world linear velocity of a world point attached to this body.
public GetLinearVelocityFromWorldPoint ( Vector2 worldPoint ) : Vector2
worldPoint Vector2 A point in world coordinates.
리턴 Vector2

GetLocalPoint() 공개 메소드

Gets a local point relative to the body's origin given a world point. Note that the vector only takes the rotation into account, not the position.
public GetLocalPoint ( Vector2 &worldPoint ) : Vector2
worldPoint Vector2 A point in world coordinates.
리턴 Vector2

GetLocalVector() 공개 메소드

Gets a local vector given a world vector. Note that the vector only takes the rotation into account, not the position.
public GetLocalVector ( Vector2 &worldVector ) : Vector2
worldVector Vector2 A vector in world coordinates.
리턴 Vector2

GetTransform() 공개 메소드

Get the body transform for the body's origin.
public GetTransform ( Transform &transform ) : void
transform Transform The transform of the body's origin.
리턴 void

GetWorldPoint() 공개 메소드

Get the world coordinates of a point given the local coordinates.
public GetWorldPoint ( Vector2 &localPoint ) : Vector2
localPoint Vector2 A point on the body measured relative the the body's origin.
리턴 Vector2

GetWorldVector() 공개 메소드

Get the world coordinates of a vector given the local coordinates. Note that the vector only takes the rotation into account, not the position.
public GetWorldVector ( Vector2 &localVector ) : Vector2
localVector Vector2 A vector fixed in the body.
리턴 Vector2

ResetDynamics() 공개 메소드

Resets the dynamics of this body. Sets torque, force and linear/angular velocity to 0
public ResetDynamics ( ) : void
리턴 void

ResetMassData() 공개 메소드

This resets the mass properties to the sum of the mass properties of the fixtures. This normally does not need to be called unless you called SetMassData to override the mass and you later want to reset the mass.
public ResetMassData ( ) : void
리턴 void

SetTransform() 공개 메소드

Set the position of the body's origin and rotation. This breaks any contacts and wakes the other bodies. Manipulating a body's transform may cause non-physical behavior.
public SetTransform ( Vector2 &position, float rotation ) : void
position Vector2 The world position of the body's local origin.
rotation float The world rotation in radians.
리턴 void

SetTransformIgnoreContacts() 공개 메소드

For teleporting a body without considering new contacts immediately.
public SetTransformIgnoreContacts ( Vector2 &position, float angle ) : void
position Vector2 The position.
angle float The angle.
리턴 void

프로퍼티 상세

ControllerFilter 공개적으로 프로퍼티

public ControllerFilter ControllerFilter
리턴 ControllerFilter

PhysicsLogicFilter 공개적으로 프로퍼티

public PhysicsLogicFilter PhysicsLogicFilter
리턴 PhysicsLogicFilter