FarseerPhysics.Dynamics.Joints.RevoluteJoint.RevoluteJoint C# (CSharp) Method

RevoluteJoint() public method

Constructor of RevoluteJoint.
public RevoluteJoint ( 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 anchor.
useWorldCoordinates bool Set to true if you are using world coordinates as anchors.
return System
		public RevoluteJoint( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false )
			: base( bodyA, bodyB )
		{
			jointType = JointType.Revolute;

			if( useWorldCoordinates )
			{
				localAnchorA = base.bodyA.getLocalPoint( anchorA );
				localAnchorB = base.bodyB.getLocalPoint( anchorB );
			}
			else
			{
				localAnchorA = anchorA;
				localAnchorB = anchorB;
			}

			referenceAngle = base.bodyB.rotation - base.bodyA.rotation;

			_impulse = Vector3.Zero;
			_limitState = LimitState.Inactive;
		}

Same methods

RevoluteJoint::RevoluteJoint ( ) : System
RevoluteJoint::RevoluteJoint ( Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false ) : System