C# Class Box2DX.Collision.PolygonShape

A convex polygon. It is assumed that the interior of the polygon is to the left of each edge.
Inheritance: Shape
Afficher le fichier Open project: danielpcox/Crisis-at-Swiss-Station Class Usage Examples

Méthodes publiques

Méthode Description
Centroid ( XForm xf ) : Vec2

Get the centroid and apply the supplied transform.

ComputeAABB ( AABB &aabb, XForm xf ) : void
ComputeCentroid ( Vec2 vs, int count ) : Vec2
ComputeMass ( MassData &massData ) : void
ComputeOBB ( OBB &obb, Vec2 vs, int count ) : void
ComputeSubmergedArea ( Vec2 normal, float offset, XForm xf, Vec2 &c ) : float
ComputeSweptAABB ( AABB &aabb, XForm transform1, XForm transform2 ) : void
GetCentroid ( ) : Vec2

Get local centroid relative to the parent body.

GetCoreVertices ( ) : Box2DX.Common.Vec2[]

Get the core vertices in local coordinates. These vertices represent a smaller polygon that is used for time of impact computations.

GetFirstVertex ( XForm xf ) : Vec2

Get the first vertex and apply the supplied transform.

GetOBB ( ) : OBB

Get the oriented bounding box relative to the parent body.

GetVertices ( ) : Box2DX.Common.Vec2[]

Get the vertices in local coordinates.

Support ( XForm xf, Vec2 d ) : Vec2

Get the support point in the given world direction. Use the supplied transform.

TestPoint ( XForm xf, Vec2 p ) : bool
TestSegment ( XForm xf, float &lambda, Vec2 &normal, Segment segment, float maxLambda ) : SegmentCollide

Private Methods

Méthode Description
PolygonShape ( ShapeDef def ) : System
UpdateSweepRadius ( Vec2 center ) : void

Method Details

Centroid() public méthode

Get the centroid and apply the supplied transform.
public Centroid ( XForm xf ) : Vec2
xf Box2DX.Common.XForm
Résultat Box2DX.Common.Vec2

ComputeAABB() public méthode

public ComputeAABB ( AABB &aabb, XForm xf ) : void
aabb AABB
xf Box2DX.Common.XForm
Résultat void

ComputeCentroid() public static méthode

public static ComputeCentroid ( Vec2 vs, int count ) : Vec2
vs Box2DX.Common.Vec2
count int
Résultat Box2DX.Common.Vec2

ComputeMass() public méthode

public ComputeMass ( MassData &massData ) : void
massData MassData
Résultat void

ComputeOBB() public static méthode

public static ComputeOBB ( OBB &obb, Vec2 vs, int count ) : void
obb OBB
vs Box2DX.Common.Vec2
count int
Résultat void

ComputeSubmergedArea() public méthode

public ComputeSubmergedArea ( Vec2 normal, float offset, XForm xf, Vec2 &c ) : float
normal Box2DX.Common.Vec2
offset float
xf Box2DX.Common.XForm
c Box2DX.Common.Vec2
Résultat float

ComputeSweptAABB() public méthode

public ComputeSweptAABB ( AABB &aabb, XForm transform1, XForm transform2 ) : void
aabb AABB
transform1 Box2DX.Common.XForm
transform2 Box2DX.Common.XForm
Résultat void

GetCentroid() public méthode

Get local centroid relative to the parent body.
public GetCentroid ( ) : Vec2
Résultat Box2DX.Common.Vec2

GetCoreVertices() public méthode

Get the core vertices in local coordinates. These vertices represent a smaller polygon that is used for time of impact computations.
public GetCoreVertices ( ) : Box2DX.Common.Vec2[]
Résultat Box2DX.Common.Vec2[]

GetFirstVertex() public méthode

Get the first vertex and apply the supplied transform.
public GetFirstVertex ( XForm xf ) : Vec2
xf Box2DX.Common.XForm
Résultat Box2DX.Common.Vec2

GetOBB() public méthode

Get the oriented bounding box relative to the parent body.
public GetOBB ( ) : OBB
Résultat OBB

GetVertices() public méthode

Get the vertices in local coordinates.
public GetVertices ( ) : Box2DX.Common.Vec2[]
Résultat Box2DX.Common.Vec2[]

Support() public méthode

Get the support point in the given world direction. Use the supplied transform.
public Support ( XForm xf, Vec2 d ) : Vec2
xf Box2DX.Common.XForm
d Box2DX.Common.Vec2
Résultat Box2DX.Common.Vec2

TestPoint() public méthode

public TestPoint ( XForm xf, Vec2 p ) : bool
xf Box2DX.Common.XForm
p Box2DX.Common.Vec2
Résultat bool

TestSegment() public méthode

public TestSegment ( XForm xf, float &lambda, Vec2 &normal, Segment segment, float maxLambda ) : SegmentCollide
xf Box2DX.Common.XForm
lambda float
normal Box2DX.Common.Vec2
segment Segment
maxLambda float
Résultat SegmentCollide