C# Class FarseerPhysics.Collision.Shapes.LoopShape

A loop Shape is a free form sequence of line segments that form a circular list. The loop may cross upon itself, but this is not recommended for smooth collision. The loop has double sided collision, so you can use inside and outside collision. Therefore, you may use any winding order.
Inheritance: Shape
Datei anzeigen Open project: scastle/Solitude Class Usage Examples

Public Properties

Property Type Description
Count int
Vertices Microsoft.Xna.Framework.Vector2[]

Public Methods

Method Description
Clone ( ) : Shape
ComputeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void

Given a transform, compute the associated axis aligned bounding box for a child shape.

ComputeMass ( MassData &massData, float density ) : void

Chains have zero mass.

GetChildEdge ( EdgeShape &edge, int index ) : void

Get a child edge.

LoopShape ( ) : System.Diagnostics
RayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool

Cast a ray against a child shape.

TestPoint ( Transform &transform, Vector2 &point ) : bool

Test a point for containment in this shape. This only works for convex shapes.

Method Details

Clone() public method

public Clone ( ) : Shape
return Shape

ComputeAABB() public method

Given a transform, compute the associated axis aligned bounding box for a child shape.
public ComputeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
aabb AABB The aabb results.
transform Transform The world transform of the shape.
childIndex int The child shape index.
return void

ComputeMass() public method

Chains have zero mass.
public ComputeMass ( MassData &massData, float density ) : void
massData MassData Returns the mass data for this shape.
density float The density in kilograms per meter squared.
return void

GetChildEdge() public method

Get a child edge.
public GetChildEdge ( EdgeShape &edge, int index ) : void
edge EdgeShape The edge.
index int The index.
return void

LoopShape() public method

public LoopShape ( ) : System.Diagnostics
return System.Diagnostics

RayCast() public method

Cast a ray against a child shape.
public RayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
output RayCastOutput The ray-cast results.
input RayCastInput The ray-cast input parameters.
transform Transform The transform to be applied to the shape.
childIndex int The child shape index.
return bool

TestPoint() public method

Test a point for containment in this shape. This only works for convex shapes.
public TestPoint ( Transform &transform, Vector2 &point ) : bool
transform Transform The shape world transform.
point Microsoft.Xna.Framework.Vector2 a point in world coordinates.
return bool

Property Details

Count public_oe property

The vertex count.
public int Count
return int

Vertices public_oe property

The vertices. These are not owned/freed by the loop Shape.
public Vector2[],Microsoft.Xna.Framework Vertices
return Microsoft.Xna.Framework.Vector2[]