C# 클래스 Duality.Components.Physics.RigidBody

상속: Component, ICmpInitializable, ICmpUpdatable, ICmpEditorUpdatable
파일 보기 프로젝트 열기: BraveSirAndrew/duality 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CheckValidTransform void
CleanupBody void
CleanupJoints void
FlagBodyShape bool
ICmpEditorUpdatable void
ICmpInitializable void
ICmpInitializable void
ICmpUpdatable void
InitBody void
Initialize void
NotifyCollisionBegin void
NotifyCollisionEnd void
NotifyCollisionSolve void
OnTransformChanged void
ProcessCollisionEvents void
ProcessSingleCollisionEvent void
Raycast_DefaultCallback float
RemoveDisposedJoints void
SetFarseerBodyType void
SetJoints void
SetShapes void
Shutdown void
UpdateBodyMass void
UpdateBodyShape void
body_OnCollision bool
body_OnSeparation void
body_PostSolve void

공개 메소드들

메소드 설명
AddJoint ( Duality.Components.Physics.JointInfo joint, RigidBody other = null ) : void

Adds a new joint to the Collider

AddShape ( Duality.Components.Physics.ShapeInfo shape ) : void

Adds a new shape to the Collider

ApplyLocalForce ( System.Vector2 force ) : void

Applies a Transform-local force to the objects mass center. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.

ApplyLocalForce ( System.Vector2 force, System.Vector2 applyAt ) : void

Applies a Transform-local force to the specified local point. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.

ApplyLocalForce ( float angularForce ) : void

Applies a Transform-local angular force to the object. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.

ApplyLocalImpulse ( System.Vector2 impulse ) : void

Applies a Transform-local impulse to the objects mass center. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.

ApplyLocalImpulse ( System.Vector2 impulse, System.Vector2 applyAt ) : void

Applies a Transform-local impulse to the specified point. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.

ApplyLocalImpulse ( float angularImpulse ) : void

Applies a Transform-local angular impulse to the object. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.

ApplyWorldForce ( System.Vector2 force ) : void

Applies a world force to the objects mass center. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.

ApplyWorldForce ( System.Vector2 force, System.Vector2 applyAt ) : void

Applies a world force to the specified world point. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.

ApplyWorldImpulse ( System.Vector2 impulse ) : void

Applies a world impulse to the objects mass center. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.

ApplyWorldImpulse ( System.Vector2 impulse, System.Vector2 applyAt ) : void

Applies a world impulse to the specified world point. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.

AwakeAll ( ) : void

Awakes all currently existing RigidBodies.

AwakeBody ( ) : void

Awakes the body if it has been in a resting state that is now being left, such as when changing physical properties at runtime. You usually don't need to call this.

BeginUpdateBodyShape ( ) : void

Prepares this RigidBody for a large-scale shape update. This isn't required but might boost update performance.

ClearJoints ( ) : void

Removes all existing joints from the Collider.

ClearShapes ( ) : void

Removes all existing shapes from the Collider.

EndUpdateBodyShape ( ) : void

Restores this RigidBody after a large-scale shape update. See BeginUpdateBodyShape.

PickShape ( System.Vector2 worldCoord ) : Duality.Components.Physics.ShapeInfo

Performs a physical picking operation and returns the shape in which the specified world coordinate is located in.

PickShapeGlobal ( System.Vector2 worldCoord ) : Duality.Components.Physics.ShapeInfo

Performs a global physical picking operation and returns the shape in which the specified world coordinate is located in.

PickShapes ( System.Vector2 worldCoord ) : List

Performs a physical picking operation and returns the shapes that intersect the specified world coordinate.

PickShapes ( System.Vector2 worldCoord, System.Vector2 size ) : List

Performs a physical picking operation and returns the shapes that intersect the specified world coordinate area.

PickShapesGlobal ( System.Vector2 worldCoord ) : List

Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate.

PickShapesGlobal ( System.Vector2 worldCoord, System.Vector2 size ) : List

Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate area.

QueryRectGlobal ( System.Vector2 worldCoord, System.Vector2 size ) : List

Performs a global physical AABB query and returns the bodies that might be roughly contained or intersected by the specified region.

RayCast ( System.Vector2 worldCoordA, System.Vector2 worldCoordB, RayCastCallback callback = null ) : List

Performs a 2d physical raycast in world coordinates.

RemoveJoint ( Duality.Components.Physics.JointInfo joint ) : void

Removes an existing joint from the Collider.

RemoveShape ( Duality.Components.Physics.ShapeInfo shape ) : void

Removes an existing shape from the Collider.

RigidBody ( ) : System
SynchronizeBodyShape ( ) : void

Forces previously scheduled body shape updates to execute. Changes to a RigidBodies shape are normally cached and executed in the following frame. Calling this method guarantes all scheduled updates to be performed immediately.

보호된 메소드들

메소드 설명
OnCopyTo ( Component target, Duality provider ) : void

비공개 메소드들

메소드 설명
CheckValidTransform ( ) : void
CleanupBody ( ) : void
CleanupJoints ( ) : void
FlagBodyShape ( ) : bool
ICmpEditorUpdatable ( ) : void
ICmpInitializable ( InitContext context ) : void
ICmpInitializable ( ShutdownContext context ) : void
ICmpUpdatable ( ) : void
InitBody ( ) : void
Initialize ( ) : void
NotifyCollisionBegin ( CollisionEventArgs args ) : void
NotifyCollisionEnd ( CollisionEventArgs args ) : void
NotifyCollisionSolve ( CollisionEventArgs args ) : void
OnTransformChanged ( object sender, TransformChangedEventArgs e ) : void
ProcessCollisionEvents ( ) : void
ProcessSingleCollisionEvent ( ColEvent colEvent ) : void
Raycast_DefaultCallback ( RayCastData data ) : float
RemoveDisposedJoints ( ) : void
SetFarseerBodyType ( BodyType value ) : void
SetJoints ( IEnumerable joints ) : void
SetShapes ( IEnumerable shapes ) : void
Shutdown ( ) : void
UpdateBodyMass ( ) : void
UpdateBodyShape ( ) : void
body_OnCollision ( Fixture fixtureA, Fixture fixtureB, Contact contact ) : bool
body_OnSeparation ( Fixture fixtureA, Fixture fixtureB ) : void
body_PostSolve ( Contact contact, ContactConstraint impulse ) : void

메소드 상세

AddJoint() 공개 메소드

Adds a new joint to the Collider
public AddJoint ( Duality.Components.Physics.JointInfo joint, RigidBody other = null ) : void
joint Duality.Components.Physics.JointInfo
other RigidBody
리턴 void

AddShape() 공개 메소드

Adds a new shape to the Collider
public AddShape ( Duality.Components.Physics.ShapeInfo shape ) : void
shape Duality.Components.Physics.ShapeInfo
리턴 void

ApplyLocalForce() 공개 메소드

Applies a Transform-local force to the objects mass center. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.
public ApplyLocalForce ( System.Vector2 force ) : void
force System.Vector2
리턴 void

ApplyLocalForce() 공개 메소드

Applies a Transform-local force to the specified local point. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.
public ApplyLocalForce ( System.Vector2 force, System.Vector2 applyAt ) : void
force System.Vector2
applyAt System.Vector2
리턴 void

ApplyLocalForce() 공개 메소드

Applies a Transform-local angular force to the object. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.
public ApplyLocalForce ( float angularForce ) : void
angularForce float
리턴 void

ApplyLocalImpulse() 공개 메소드

Applies a Transform-local impulse to the objects mass center. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.
public ApplyLocalImpulse ( System.Vector2 impulse ) : void
impulse System.Vector2
리턴 void

ApplyLocalImpulse() 공개 메소드

Applies a Transform-local impulse to the specified point. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.
public ApplyLocalImpulse ( System.Vector2 impulse, System.Vector2 applyAt ) : void
impulse System.Vector2
applyAt System.Vector2
리턴 void

ApplyLocalImpulse() 공개 메소드

Applies a Transform-local angular impulse to the object. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.
public ApplyLocalImpulse ( float angularImpulse ) : void
angularImpulse float
리턴 void

ApplyWorldForce() 공개 메소드

Applies a world force to the objects mass center. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.
public ApplyWorldForce ( System.Vector2 force ) : void
force System.Vector2
리턴 void

ApplyWorldForce() 공개 메소드

Applies a world force to the specified world point. You don't need to apply Time.TimeMult here, the physics simulation takes care of this.
public ApplyWorldForce ( System.Vector2 force, System.Vector2 applyAt ) : void
force System.Vector2
applyAt System.Vector2
리턴 void

ApplyWorldImpulse() 공개 메소드

Applies a world impulse to the objects mass center. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.
public ApplyWorldImpulse ( System.Vector2 impulse ) : void
impulse System.Vector2
리턴 void

ApplyWorldImpulse() 공개 메소드

Applies a world impulse to the specified world point. You don't usually need to apply Time.TimeMult here because it is inteded to be a one-time force impact.
public ApplyWorldImpulse ( System.Vector2 impulse, System.Vector2 applyAt ) : void
impulse System.Vector2
applyAt System.Vector2
리턴 void

AwakeAll() 공개 정적인 메소드

Awakes all currently existing RigidBodies.
public static AwakeAll ( ) : void
리턴 void

AwakeBody() 공개 메소드

Awakes the body if it has been in a resting state that is now being left, such as when changing physical properties at runtime. You usually don't need to call this.
public AwakeBody ( ) : void
리턴 void

BeginUpdateBodyShape() 공개 메소드

Prepares this RigidBody for a large-scale shape update. This isn't required but might boost update performance.
public BeginUpdateBodyShape ( ) : void
리턴 void

ClearJoints() 공개 메소드

Removes all existing joints from the Collider.
public ClearJoints ( ) : void
리턴 void

ClearShapes() 공개 메소드

Removes all existing shapes from the Collider.
public ClearShapes ( ) : void
리턴 void

EndUpdateBodyShape() 공개 메소드

Restores this RigidBody after a large-scale shape update. See BeginUpdateBodyShape.
public EndUpdateBodyShape ( ) : void
리턴 void

OnCopyTo() 보호된 메소드

protected OnCopyTo ( Component target, Duality provider ) : void
target Component
provider Duality
리턴 void

PickShape() 공개 메소드

Performs a physical picking operation and returns the shape in which the specified world coordinate is located in.
public PickShape ( System.Vector2 worldCoord ) : Duality.Components.Physics.ShapeInfo
worldCoord System.Vector2
리턴 Duality.Components.Physics.ShapeInfo

PickShapeGlobal() 공개 정적인 메소드

Performs a global physical picking operation and returns the shape in which the specified world coordinate is located in.
public static PickShapeGlobal ( System.Vector2 worldCoord ) : Duality.Components.Physics.ShapeInfo
worldCoord System.Vector2
리턴 Duality.Components.Physics.ShapeInfo

PickShapes() 공개 메소드

Performs a physical picking operation and returns the shapes that intersect the specified world coordinate.
public PickShapes ( System.Vector2 worldCoord ) : List
worldCoord System.Vector2
리턴 List

PickShapes() 공개 메소드

Performs a physical picking operation and returns the shapes that intersect the specified world coordinate area.
public PickShapes ( System.Vector2 worldCoord, System.Vector2 size ) : List
worldCoord System.Vector2
size System.Vector2
리턴 List

PickShapesGlobal() 공개 정적인 메소드

Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate.
public static PickShapesGlobal ( System.Vector2 worldCoord ) : List
worldCoord System.Vector2
리턴 List

PickShapesGlobal() 공개 정적인 메소드

Performs a global physical picking operation and returns the shapes that intersect the specified world coordinate area.
public static PickShapesGlobal ( System.Vector2 worldCoord, System.Vector2 size ) : List
worldCoord System.Vector2
size System.Vector2
리턴 List

QueryRectGlobal() 공개 정적인 메소드

Performs a global physical AABB query and returns the bodies that might be roughly contained or intersected by the specified region.
public static QueryRectGlobal ( System.Vector2 worldCoord, System.Vector2 size ) : List
worldCoord System.Vector2
size System.Vector2
리턴 List

RayCast() 공개 정적인 메소드

Performs a 2d physical raycast in world coordinates.
public static RayCast ( System.Vector2 worldCoordA, System.Vector2 worldCoordB, RayCastCallback callback = null ) : List
worldCoordA System.Vector2 The starting point.
worldCoordB System.Vector2 The desired end point.
callback RayCastCallback /// The callback that is invoked for each hit on the raycast. Note that the order in which each hit occurs isn't deterministic /// and may appear random. Return -1 to ignore the curret shape, 0 to terminate the raycast, data.Fraction to clip the ray for current hit, or 1 to continue. ///
리턴 List

RemoveJoint() 공개 메소드

Removes an existing joint from the Collider.
public RemoveJoint ( Duality.Components.Physics.JointInfo joint ) : void
joint Duality.Components.Physics.JointInfo
리턴 void

RemoveShape() 공개 메소드

Removes an existing shape from the Collider.
public RemoveShape ( Duality.Components.Physics.ShapeInfo shape ) : void
shape Duality.Components.Physics.ShapeInfo
리턴 void

RigidBody() 공개 메소드

public RigidBody ( ) : System
리턴 System

SynchronizeBodyShape() 공개 메소드

Forces previously scheduled body shape updates to execute. Changes to a RigidBodies shape are normally cached and executed in the following frame. Calling this method guarantes all scheduled updates to be performed immediately.
public SynchronizeBodyShape ( ) : void
리턴 void