FarseerPhysics.Common.PolygonTools.createRectangle C# (CSharp) Method

createRectangle() public static method

Build vertices to represent an axis-aligned box.
public static createRectangle ( float hx, float hy ) : Vertices
hx float the half-width.
hy float the half-height.
return Vertices
		public static Vertices createRectangle( float hx, float hy )
		{
			var vertices = new Vertices( 4 );
			vertices.Add( new Vector2( -hx, -hy ) );
			vertices.Add( new Vector2( hx, -hy ) );
			vertices.Add( new Vector2( hx, hy ) );
			vertices.Add( new Vector2( -hx, hy ) );

			return vertices;
		}

Same methods

PolygonTools::createRectangle ( float hx, float hy, Vector2 center, float angle ) : Vertices