FarseerPhysics.Dynamics.Body.getWorldPoint C# (CSharp) Method

getWorldPoint() public method

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.
return Vector2
		public Vector2 getWorldPoint( ref Vector2 localPoint )
		{
			return MathUtils.Mul( ref _xf, ref localPoint );
		}

Usage Example

Esempio n. 1
0
		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;
		}