C# 클래스 FarseerPhysics.Dynamics.Joints.DistanceJoint

A distance joint rains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
상속: Joint
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
dampingRatio float
frequency float
length float
localAnchorA Vector2
localAnchorB Vector2

공개 메소드들

메소드 설명
DistanceJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System

This requires defining an anchor point on both bodies and the non-zero length of the distance joint. If you don't supply a length, the local anchor points is used so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game. Warning Do not use a zero or short length.

getReactionForce ( float invDt ) : Vector2

Get the reaction force given the inverse time step. Unit is N.

getReactionTorque ( float invDt ) : float

Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.

비공개 메소드들

메소드 설명
DistanceJoint ( ) : System
initVelocityConstraints ( SolverData &data ) : void
solvePositionConstraints ( SolverData &data ) : bool
solveVelocityConstraints ( SolverData &data ) : void

메소드 상세

DistanceJoint() 공개 메소드

This requires defining an anchor point on both bodies and the non-zero length of the distance joint. If you don't supply a length, the local anchor points is used so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game. Warning Do not use a zero or short length.
public DistanceJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System
bodyA Body The first body
bodyB Body The second body
anchorA Vector2 The first body anchor
anchorB Vector2 The second body anchor
useWorldCoordinates bool Set to true if you are using world coordinates as anchors.
리턴 System

getReactionForce() 공개 메소드

Get the reaction force given the inverse time step. Unit is N.
public getReactionForce ( float invDt ) : Vector2
invDt float
리턴 Vector2

getReactionTorque() 공개 메소드

Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.
public getReactionTorque ( float invDt ) : float
invDt float
리턴 float

프로퍼티 상세

dampingRatio 공개적으로 프로퍼티

The damping ratio. 0 = no damping, 1 = critical damping.
public float dampingRatio
리턴 float

frequency 공개적으로 프로퍼티

The mass-spring-damper frequency in Hertz. A value of 0 disables softness.
public float frequency
리턴 float

length 공개적으로 프로퍼티

The natural length between the anchor points. Manipulating the length can lead to non-physical behavior when the frequency is zero.
public float length
리턴 float

localAnchorA 공개적으로 프로퍼티

The local anchor point relative to bodyA's origin.
public Vector2 localAnchorA
리턴 Vector2

localAnchorB 공개적으로 프로퍼티

The local anchor point relative to bodyB's origin.
public Vector2 localAnchorB
리턴 Vector2