C# Класс Box2DX.Collision.PolygonShape

A convex polygon. It is assumed that the interior of the polygon is to the left of each edge.
Наследование: Shape
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
PolygonShape ( ShapeDef def ) : System
UpdateSweepRadius ( Vec2 center ) : void

Описание методов

Centroid() публичный Метод

Get the centroid and apply the supplied transform.
public Centroid ( XForm xf ) : Vec2
xf Box2DX.Common.XForm
Результат Box2DX.Common.Vec2

ComputeAABB() публичный Метод

public ComputeAABB ( AABB &aabb, XForm xf ) : void
aabb AABB
xf Box2DX.Common.XForm
Результат void

ComputeCentroid() публичный статический Метод

public static ComputeCentroid ( Vec2 vs, int count ) : Vec2
vs Box2DX.Common.Vec2
count int
Результат Box2DX.Common.Vec2

ComputeMass() публичный Метод

public ComputeMass ( MassData &massData ) : void
massData MassData
Результат void

ComputeOBB() публичный статический Метод

public static ComputeOBB ( OBB &obb, Vec2 vs, int count ) : void
obb OBB
vs Box2DX.Common.Vec2
count int
Результат void

ComputeSubmergedArea() публичный Метод

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
Результат float

ComputeSweptAABB() публичный Метод

public ComputeSweptAABB ( AABB &aabb, XForm transform1, XForm transform2 ) : void
aabb AABB
transform1 Box2DX.Common.XForm
transform2 Box2DX.Common.XForm
Результат void

GetCentroid() публичный Метод

Get local centroid relative to the parent body.
public GetCentroid ( ) : Vec2
Результат Box2DX.Common.Vec2

GetCoreVertices() публичный Метод

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[]
Результат Box2DX.Common.Vec2[]

GetFirstVertex() публичный Метод

Get the first vertex and apply the supplied transform.
public GetFirstVertex ( XForm xf ) : Vec2
xf Box2DX.Common.XForm
Результат Box2DX.Common.Vec2

GetOBB() публичный Метод

Get the oriented bounding box relative to the parent body.
public GetOBB ( ) : OBB
Результат OBB

GetVertices() публичный Метод

Get the vertices in local coordinates.
public GetVertices ( ) : Box2DX.Common.Vec2[]
Результат Box2DX.Common.Vec2[]

Support() публичный Метод

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
Результат Box2DX.Common.Vec2

TestPoint() публичный Метод

public TestPoint ( XForm xf, Vec2 p ) : bool
xf Box2DX.Common.XForm
p Box2DX.Common.Vec2
Результат bool

TestSegment() публичный Метод

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
Результат SegmentCollide