FarseerPhysics.Dynamics.World.addJoint C# (CSharp) Method

addJoint() public method

Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding.
public addJoint ( Joint joint ) : void
joint FarseerPhysics.Dynamics.Joints.Joint The joint.
return void
		public void addJoint( Joint joint )
		{
			Debug.Assert( !_jointAddList.Contains( joint ), "You are adding the same joint more than once." );

			if( !_jointAddList.Contains( joint ) )
				_jointAddList.Add( joint );
		}

Usage Example

コード例 #1
0
ファイル: JointFactory.cs プロジェクト: prime31/Nez
		public static RevoluteJoint CreateRevoluteJoint( World world, Body bodyA, Body bodyB, Vector2 anchor )
		{
			var localanchorA = bodyA.getLocalPoint( bodyB.getWorldPoint( anchor ) );
			var joint = new RevoluteJoint( bodyA, bodyB, localanchorA, anchor );
			world.addJoint( joint );
			return joint;
		}
All Usage Examples Of FarseerPhysics.Dynamics.World::addJoint