C# Class Project290.Physics.Factories.FixtureFactory

An easy to use factory for creating bodies
Show file Open project: scastle/Solitude

Public Methods

Method Description
CreateBreakableBody ( World world, Vertices vertices, float density ) : BreakableBody
CreateBreakableBody ( World world, Vertices vertices, float density, Object userData ) : BreakableBody
CreateBreakableBody ( World world, Vertices vertices, float density, Vector2 position ) : BreakableBody
CreateBreakableBody ( World world, Vertices vertices, float density, Vector2 position, Object userData ) : BreakableBody

Creates a breakable body. You would want to remove collinear points before using this.

CreateCapsule ( World world, float height, float endRadius, float density ) : List
CreateCapsule ( World world, float height, float endRadius, float density, Object userData ) : List
CreateCapsule ( World world, float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges, float density, Vector2 position ) : List
CreateCapsule ( World world, float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges, float density, Vector2 position, Object userData ) : List

Creates a capsule. Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices)

CreateCircle ( World world, float radius, float density ) : Fixture
CreateCircle ( World world, float radius, float density, Object userData ) : Fixture
CreateCircle ( World world, float radius, float density, Vector2 position ) : Fixture
CreateCircle ( World world, float radius, float density, Vector2 position, Object userData ) : Fixture
CreateCircle ( float radius, float density, Body body ) : Fixture
CreateCircle ( float radius, float density, Body body, Object userData ) : Fixture
CreateCircle ( float radius, float density, Body body, Vector2 offset ) : Fixture
CreateCircle ( float radius, float density, Body body, Vector2 offset, Object userData ) : Fixture
CreateCompoundPolygon ( List list, float density, Body body ) : List
CreateCompoundPolygon ( List list, float density, Body body, Object userData ) : List
CreateCompoundPolygon ( World world, List list, float density ) : List
CreateCompoundPolygon ( World world, List list, float density, BodyType type ) : List
CreateCompoundPolygon ( World world, List list, float density, Object userData ) : List
CreateCompoundPolygon ( World world, List list, float density, Vector2 position ) : List
CreateCompoundPolygon ( World world, List list, float density, Vector2 position, Object userData ) : List
CreateEdge ( Vector2 start, Vector2 end, Body body ) : Fixture
CreateEdge ( Vector2 start, Vector2 end, Body body, Object userData ) : Fixture
CreateEdge ( World world, Vector2 start, Vector2 end ) : Fixture
CreateEdge ( World world, Vector2 start, Vector2 end, Object userData ) : Fixture
CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density ) : Fixture
CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density, Object userData ) : Fixture
CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density, Vector2 position ) : Fixture
CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density, Vector2 position, Object userData ) : Fixture
CreateEllipse ( float xRadius, float yRadius, int edges, float density, Body body ) : Fixture
CreateEllipse ( float xRadius, float yRadius, int edges, float density, Body body, Object userData ) : Fixture
CreateGear ( World world, float radius, int numberOfTeeth, float tipPercentage, float toothHeight, float density ) : List
CreateGear ( World world, float radius, int numberOfTeeth, float tipPercentage, float toothHeight, float density, Object userData ) : List
CreateLoopShape ( Vertices vertices, float density, Body body ) : Fixture
CreateLoopShape ( Vertices vertices, float density, Body body, Object userData ) : Fixture
CreateLoopShape ( World world, Vertices vertices, float density ) : Fixture
CreateLoopShape ( World world, Vertices vertices, float density, Object userData ) : Fixture
CreateLoopShape ( World world, Vertices vertices, float density, Vector2 position ) : Fixture
CreateLoopShape ( World world, Vertices vertices, float density, Vector2 position, Object userData ) : Fixture
CreatePolygon ( Vertices vertices, float density, Body body ) : Fixture
CreatePolygon ( Vertices vertices, float density, Body body, Object userData ) : Fixture
CreatePolygon ( World world, Vertices vertices, float density ) : Fixture
CreatePolygon ( World world, Vertices vertices, float density, Object userData ) : Fixture
CreatePolygon ( World world, Vertices vertices, float density, Vector2 position ) : Fixture
CreatePolygon ( World world, Vertices vertices, float density, Vector2 position, Object userData ) : Fixture
CreateRectangle ( World world, float width, float height, float density ) : Fixture
CreateRectangle ( World world, float width, float height, float density, Object userData ) : Fixture
CreateRectangle ( World world, float width, float height, float density, Vector2 position ) : Fixture
CreateRectangle ( World world, float width, float height, float density, Vector2 position, Object userData ) : Fixture
CreateRectangle ( float width, float height, float density, Vector2 offset, Body body ) : Fixture
CreateRectangle ( float width, float height, float density, Vector2 offset, Body body, Object userData ) : Fixture

Special overload that takes in an existing body.

CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density ) : List
CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Object userData ) : List
CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Vector2 position ) : List
CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Vector2 position, Object userData ) : List

Creates a rounded rectangle. Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices)

Method Details

CreateBreakableBody() public static method

public static CreateBreakableBody ( World world, Vertices vertices, float density ) : BreakableBody
world Project290.Physics.Dynamics.World
vertices Vertices
density float
return Project290.Physics.Dynamics.BreakableBody

CreateBreakableBody() public static method

public static CreateBreakableBody ( World world, Vertices vertices, float density, Object userData ) : BreakableBody
world Project290.Physics.Dynamics.World
vertices Vertices
density float
userData Object
return Project290.Physics.Dynamics.BreakableBody

CreateBreakableBody() public static method

public static CreateBreakableBody ( World world, Vertices vertices, float density, Vector2 position ) : BreakableBody
world Project290.Physics.Dynamics.World
vertices Vertices
density float
position Vector2
return Project290.Physics.Dynamics.BreakableBody

CreateBreakableBody() public static method

Creates a breakable body. You would want to remove collinear points before using this.
public static CreateBreakableBody ( World world, Vertices vertices, float density, Vector2 position, Object userData ) : BreakableBody
world Project290.Physics.Dynamics.World The world.
vertices Vertices The vertices.
density float The density.
position Vector2 The position.
userData Object
return Project290.Physics.Dynamics.BreakableBody

CreateCapsule() public static method

public static CreateCapsule ( World world, float height, float endRadius, float density ) : List
world Project290.Physics.Dynamics.World
height float
endRadius float
density float
return List

CreateCapsule() public static method

public static CreateCapsule ( World world, float height, float endRadius, float density, Object userData ) : List
world Project290.Physics.Dynamics.World
height float
endRadius float
density float
userData Object
return List

CreateCapsule() public static method

public static CreateCapsule ( World world, float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges, float density, Vector2 position ) : List
world Project290.Physics.Dynamics.World
height float
topRadius float
topEdges int
bottomRadius float
bottomEdges int
density float
position Vector2
return List

CreateCapsule() public static method

Creates a capsule. Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices)
public static CreateCapsule ( World world, float height, float topRadius, int topEdges, float bottomRadius, int bottomEdges, float density, Vector2 position, Object userData ) : List
world Project290.Physics.Dynamics.World The world.
height float The height.
topRadius float The top radius.
topEdges int The top edges.
bottomRadius float The bottom radius.
bottomEdges int The bottom edges.
density float The density.
position Vector2 The position.
userData Object
return List

CreateCircle() public static method

public static CreateCircle ( World world, float radius, float density ) : Fixture
world Project290.Physics.Dynamics.World
radius float
density float
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( World world, float radius, float density, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
radius float
density float
userData Object
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( World world, float radius, float density, Vector2 position ) : Fixture
world Project290.Physics.Dynamics.World
radius float
density float
position Vector2
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( World world, float radius, float density, Vector2 position, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
radius float
density float
position Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( float radius, float density, Body body ) : Fixture
radius float
density float
body Project290.Physics.Dynamics.Body
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( float radius, float density, Body body, Object userData ) : Fixture
radius float
density float
body Project290.Physics.Dynamics.Body
userData Object
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( float radius, float density, Body body, Vector2 offset ) : Fixture
radius float
density float
body Project290.Physics.Dynamics.Body
offset Vector2
return Project290.Physics.Dynamics.Fixture

CreateCircle() public static method

public static CreateCircle ( float radius, float density, Body body, Vector2 offset, Object userData ) : Fixture
radius float
density float
body Project290.Physics.Dynamics.Body
offset Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( List list, float density, Body body ) : List
list List
density float
body Project290.Physics.Dynamics.Body
return List

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( List list, float density, Body body, Object userData ) : List
list List
density float
body Project290.Physics.Dynamics.Body
userData Object
return List

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( World world, List list, float density ) : List
world Project290.Physics.Dynamics.World
list List
density float
return List

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( World world, List list, float density, BodyType type ) : List
world Project290.Physics.Dynamics.World
list List
density float
type BodyType
return List

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( World world, List list, float density, Object userData ) : List
world Project290.Physics.Dynamics.World
list List
density float
userData Object
return List

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( World world, List list, float density, Vector2 position ) : List
world Project290.Physics.Dynamics.World
list List
density float
position Vector2
return List

CreateCompoundPolygon() public static method

public static CreateCompoundPolygon ( World world, List list, float density, Vector2 position, Object userData ) : List
world Project290.Physics.Dynamics.World
list List
density float
position Vector2
userData Object
return List

CreateEdge() public static method

public static CreateEdge ( Vector2 start, Vector2 end, Body body ) : Fixture
start Vector2
end Vector2
body Project290.Physics.Dynamics.Body
return Project290.Physics.Dynamics.Fixture

CreateEdge() public static method

public static CreateEdge ( Vector2 start, Vector2 end, Body body, Object userData ) : Fixture
start Vector2
end Vector2
body Project290.Physics.Dynamics.Body
userData Object
return Project290.Physics.Dynamics.Fixture

CreateEdge() public static method

public static CreateEdge ( World world, Vector2 start, Vector2 end ) : Fixture
world Project290.Physics.Dynamics.World
start Vector2
end Vector2
return Project290.Physics.Dynamics.Fixture

CreateEdge() public static method

public static CreateEdge ( World world, Vector2 start, Vector2 end, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
start Vector2
end Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreateEllipse() public static method

public static CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density ) : Fixture
world Project290.Physics.Dynamics.World
xRadius float
yRadius float
edges int
density float
return Project290.Physics.Dynamics.Fixture

CreateEllipse() public static method

public static CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
xRadius float
yRadius float
edges int
density float
userData Object
return Project290.Physics.Dynamics.Fixture

CreateEllipse() public static method

public static CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density, Vector2 position ) : Fixture
world Project290.Physics.Dynamics.World
xRadius float
yRadius float
edges int
density float
position Vector2
return Project290.Physics.Dynamics.Fixture

CreateEllipse() public static method

public static CreateEllipse ( World world, float xRadius, float yRadius, int edges, float density, Vector2 position, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
xRadius float
yRadius float
edges int
density float
position Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreateEllipse() public static method

public static CreateEllipse ( float xRadius, float yRadius, int edges, float density, Body body ) : Fixture
xRadius float
yRadius float
edges int
density float
body Project290.Physics.Dynamics.Body
return Project290.Physics.Dynamics.Fixture

CreateEllipse() public static method

public static CreateEllipse ( float xRadius, float yRadius, int edges, float density, Body body, Object userData ) : Fixture
xRadius float
yRadius float
edges int
density float
body Project290.Physics.Dynamics.Body
userData Object
return Project290.Physics.Dynamics.Fixture

CreateGear() public static method

public static CreateGear ( World world, float radius, int numberOfTeeth, float tipPercentage, float toothHeight, float density ) : List
world Project290.Physics.Dynamics.World
radius float
numberOfTeeth int
tipPercentage float
toothHeight float
density float
return List

CreateGear() public static method

public static CreateGear ( World world, float radius, int numberOfTeeth, float tipPercentage, float toothHeight, float density, Object userData ) : List
world Project290.Physics.Dynamics.World
radius float
numberOfTeeth int
tipPercentage float
toothHeight float
density float
userData Object
return List

CreateLoopShape() public static method

public static CreateLoopShape ( Vertices vertices, float density, Body body ) : Fixture
vertices Vertices
density float
body Project290.Physics.Dynamics.Body
return Project290.Physics.Dynamics.Fixture

CreateLoopShape() public static method

public static CreateLoopShape ( Vertices vertices, float density, Body body, Object userData ) : Fixture
vertices Vertices
density float
body Project290.Physics.Dynamics.Body
userData Object
return Project290.Physics.Dynamics.Fixture

CreateLoopShape() public static method

public static CreateLoopShape ( World world, Vertices vertices, float density ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
return Project290.Physics.Dynamics.Fixture

CreateLoopShape() public static method

public static CreateLoopShape ( World world, Vertices vertices, float density, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
userData Object
return Project290.Physics.Dynamics.Fixture

CreateLoopShape() public static method

public static CreateLoopShape ( World world, Vertices vertices, float density, Vector2 position ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
position Vector2
return Project290.Physics.Dynamics.Fixture

CreateLoopShape() public static method

public static CreateLoopShape ( World world, Vertices vertices, float density, Vector2 position, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
position Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreatePolygon() public static method

public static CreatePolygon ( Vertices vertices, float density, Body body ) : Fixture
vertices Vertices
density float
body Project290.Physics.Dynamics.Body
return Project290.Physics.Dynamics.Fixture

CreatePolygon() public static method

public static CreatePolygon ( Vertices vertices, float density, Body body, Object userData ) : Fixture
vertices Vertices
density float
body Project290.Physics.Dynamics.Body
userData Object
return Project290.Physics.Dynamics.Fixture

CreatePolygon() public static method

public static CreatePolygon ( World world, Vertices vertices, float density ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
return Project290.Physics.Dynamics.Fixture

CreatePolygon() public static method

public static CreatePolygon ( World world, Vertices vertices, float density, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
userData Object
return Project290.Physics.Dynamics.Fixture

CreatePolygon() public static method

public static CreatePolygon ( World world, Vertices vertices, float density, Vector2 position ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
position Vector2
return Project290.Physics.Dynamics.Fixture

CreatePolygon() public static method

public static CreatePolygon ( World world, Vertices vertices, float density, Vector2 position, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
vertices Vertices
density float
position Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreateRectangle() public static method

public static CreateRectangle ( World world, float width, float height, float density ) : Fixture
world Project290.Physics.Dynamics.World
width float
height float
density float
return Project290.Physics.Dynamics.Fixture

CreateRectangle() public static method

public static CreateRectangle ( World world, float width, float height, float density, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
width float
height float
density float
userData Object
return Project290.Physics.Dynamics.Fixture

CreateRectangle() public static method

public static CreateRectangle ( World world, float width, float height, float density, Vector2 position ) : Fixture
world Project290.Physics.Dynamics.World
width float
height float
density float
position Vector2
return Project290.Physics.Dynamics.Fixture

CreateRectangle() public static method

public static CreateRectangle ( World world, float width, float height, float density, Vector2 position, Object userData ) : Fixture
world Project290.Physics.Dynamics.World
width float
height float
density float
position Vector2
userData Object
return Project290.Physics.Dynamics.Fixture

CreateRectangle() public static method

public static CreateRectangle ( float width, float height, float density, Vector2 offset, Body body ) : Fixture
width float
height float
density float
offset Vector2
body Project290.Physics.Dynamics.Body
return Project290.Physics.Dynamics.Fixture

CreateRectangle() public static method

Special overload that takes in an existing body.
public static CreateRectangle ( float width, float height, float density, Vector2 offset, Body body, Object userData ) : Fixture
width float The width.
height float The height.
density float The density.
offset Vector2 The offset. The new shape is offset by this value
body Project290.Physics.Dynamics.Body The body.
userData Object
return Project290.Physics.Dynamics.Fixture

CreateRoundedRectangle() public static method

public static CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density ) : List
world Project290.Physics.Dynamics.World
width float
height float
xRadius float
yRadius float
segments int
density float
return List

CreateRoundedRectangle() public static method

public static CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Object userData ) : List
world Project290.Physics.Dynamics.World
width float
height float
xRadius float
yRadius float
segments int
density float
userData Object
return List

CreateRoundedRectangle() public static method

public static CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Vector2 position ) : List
world Project290.Physics.Dynamics.World
width float
height float
xRadius float
yRadius float
segments int
density float
position Vector2
return List

CreateRoundedRectangle() public static method

Creates a rounded rectangle. Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices)
public static CreateRoundedRectangle ( World world, float width, float height, float xRadius, float yRadius, int segments, float density, Vector2 position, Object userData ) : List
world Project290.Physics.Dynamics.World The world.
width float The width.
height float The height.
xRadius float The x radius.
yRadius float The y radius.
segments int The segments.
density float The density.
position Vector2 The position.
userData Object
return List