C# Class Nez.Farseer.Farseer.BodyFactory

exactly the same as FarseerPhysics.Factories.BodyFactory except all units are in display/Nez space as opposed to simulation space
显示文件 Open project: prime31/Nez

Public Methods

Method Description
createBody ( World world, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createBreakableBody ( World world, IEnumerable shapes, Vector2 position = newVector2(), float rotation ) : BreakableBody
createBreakableBody ( World world, Vertices vertices, float density, Vector2 position = newVector2(), float rotation ) : BreakableBody
createCapsule ( World world, float height, float endRadius, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createCapsule ( World world, float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createChainShape ( World world, Vertices vertices, Vector2 position = newVector2(), object userData = null ) : Body
createCircle ( World world, float radius, float density, Vector2 position = newVector2(), BodyType bodyType = BodyType.Static, object userData = null ) : Body
createCompoundPolygon ( World world, List list, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createEdge ( World world, Vector2 start, Vector2 end, object userData = null ) : Body
createEllipse ( World world, float xRadius, float yRadius, int edges, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createGear ( World world, float radius, int numberOfTeeth, float tipPercentage, float toothHeight, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createLineArc ( World world, float radians, int sides, float radius, bool closed = false, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createLoopShape ( World world, Vertices vertices, Vector2 position = newVector2(), object userData = null ) : Body
createPolygon ( World world, Vertices vertices, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createRectangle ( World world, float width, float height, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
createSolidArc ( World world, float density, float radians, int sides, float radius, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body

Method Details

createBody() public static method

public static createBody ( World world, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createBreakableBody() public static method

public static createBreakableBody ( World world, IEnumerable shapes, Vector2 position = newVector2(), float rotation ) : BreakableBody
world FarseerPhysics.Dynamics.World
shapes IEnumerable
position Microsoft.Xna.Framework.Vector2
rotation float
return FarseerPhysics.Dynamics.BreakableBody

createBreakableBody() public static method

public static createBreakableBody ( World world, Vertices vertices, float density, Vector2 position = newVector2(), float rotation ) : BreakableBody
world FarseerPhysics.Dynamics.World
vertices Vertices
density float
position Microsoft.Xna.Framework.Vector2
rotation float
return FarseerPhysics.Dynamics.BreakableBody

createCapsule() public static method

public static createCapsule ( World world, float height, float endRadius, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
height float
endRadius float
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createCapsule() public static method

public static createCapsule ( World world, float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
height float
topRadius float
topEdges int
bottomRadius float
bottomEdges int
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createChainShape() public static method

public static createChainShape ( World world, Vertices vertices, Vector2 position = newVector2(), object userData = null ) : Body
world FarseerPhysics.Dynamics.World
vertices Vertices
position Microsoft.Xna.Framework.Vector2
userData object
return FarseerPhysics.Dynamics.Body

createCircle() public static method

public static createCircle ( World world, float radius, float density, Vector2 position = newVector2(), BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
radius float
density float
position Microsoft.Xna.Framework.Vector2
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createCompoundPolygon() public static method

public static createCompoundPolygon ( World world, List list, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
list List
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createEdge() public static method

public static createEdge ( World world, Vector2 start, Vector2 end, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
start Microsoft.Xna.Framework.Vector2
end Microsoft.Xna.Framework.Vector2
userData object
return FarseerPhysics.Dynamics.Body

createEllipse() public static method

public static createEllipse ( World world, float xRadius, float yRadius, int edges, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
xRadius float
yRadius float
edges int
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createGear() public static method

public static createGear ( World world, float radius, int numberOfTeeth, float tipPercentage, float toothHeight, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
radius float
numberOfTeeth int
tipPercentage float
toothHeight float
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createLineArc() public static method

public static createLineArc ( World world, float radians, int sides, float radius, bool closed = false, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
radians float
sides int
radius float
closed bool
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createLoopShape() public static method

public static createLoopShape ( World world, Vertices vertices, Vector2 position = newVector2(), object userData = null ) : Body
world FarseerPhysics.Dynamics.World
vertices Vertices
position Microsoft.Xna.Framework.Vector2
userData object
return FarseerPhysics.Dynamics.Body

createPolygon() public static method

public static createPolygon ( World world, Vertices vertices, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
vertices Vertices
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createRectangle() public static method

public static createRectangle ( World world, float width, float height, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
width float
height float
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createRoundedRectangle() public static method

public static createRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
width float
height float
xRadius float
yRadius float
segments int
density float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body

createSolidArc() public static method

public static createSolidArc ( World world, float density, float radians, int sides, float radius, Vector2 position = newVector2(), float rotation, BodyType bodyType = BodyType.Static, object userData = null ) : Body
world FarseerPhysics.Dynamics.World
density float
radians float
sides int
radius float
position Microsoft.Xna.Framework.Vector2
rotation float
bodyType BodyType
userData object
return FarseerPhysics.Dynamics.Body