C# Class FarseerPhysics.Collision.Shapes.PolygonShape

Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of points.
Inheritance: Shape
显示文件 Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
CompareTo ( PolygonShape shape ) : bool
PolygonShape ( Vertices vertices, float density ) : System.Diagnostics

Initializes a new instance of the PolygonShape class.

PolygonShape ( float density ) : System.Diagnostics

Create a new PolygonShape with the specified density.

clone ( ) : Shape
computeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void

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

computeSubmergedArea ( Vector2 &normal, float offset, Transform &xf, Vector2 &sc ) : float
rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
setVerticesNoCopy ( Vertices verts ) : void

sets the vertices without copying over the data from verts to the local List.

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

Protected Methods

Method Description
computeProperties ( ) : void

Private Methods

Method Description
PolygonShape ( ) : System.Diagnostics

Method Details

CompareTo() public method

public CompareTo ( PolygonShape shape ) : bool
shape PolygonShape
return bool

PolygonShape() public method

Initializes a new instance of the PolygonShape class.
public PolygonShape ( Vertices vertices, float density ) : System.Diagnostics
vertices Vertices The vertices.
density float The density.
return System.Diagnostics

PolygonShape() public method

Create a new PolygonShape with the specified density.
public PolygonShape ( float density ) : System.Diagnostics
density float The density.
return System.Diagnostics

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

computeProperties() protected method

protected computeProperties ( ) : void
return void

computeSubmergedArea() public method

public computeSubmergedArea ( Vector2 &normal, float offset, Transform &xf, Vector2 &sc ) : float
normal Microsoft.Xna.Framework.Vector2
offset float
xf Transform
sc Microsoft.Xna.Framework.Vector2
return float

rayCast() public method

public rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
output RayCastOutput
input RayCastInput
transform Transform
childIndex int
return bool

setVerticesNoCopy() public method

sets the vertices without copying over the data from verts to the local List.
public setVerticesNoCopy ( Vertices verts ) : void
verts Vertices Verts.
return void

testPoint() public method

public testPoint ( Transform &transform, Vector2 &point ) : bool
transform Transform
point Microsoft.Xna.Framework.Vector2
return bool