C# Class Box2DX.Collision.PolygonDef

Inheritance: ShapeDef
Show file Open project: danielpcox/Crisis-at-Swiss-Station Class Usage Examples

Public Properties

Property Type Description
VertexCount int
Vertices Box2DX.Common.Vec2[]

Public Methods

Method Description
PolygonDef ( ) : System
SetAsBox ( float hx, float hy ) : void

Build vertices to represent an axis-aligned box.

SetAsBox ( float hx, float hy, Vec2 center, float angle ) : void

Build vertices to represent an oriented box.

Method Details

PolygonDef() public method

public PolygonDef ( ) : System
return System

SetAsBox() public method

Build vertices to represent an axis-aligned box.
public SetAsBox ( float hx, float hy ) : void
hx float The half-width
hy float The half-height.
return void

SetAsBox() public method

Build vertices to represent an oriented box.
public SetAsBox ( float hx, float hy, Vec2 center, float angle ) : void
hx float The half-width
hy float The half-height.
center Box2DX.Common.Vec2 The center of the box in local coordinates.
angle float The rotation of the box in local coordinates.
return void

Property Details

VertexCount public property

The number of polygon vertices.
public int VertexCount
return int

Vertices public property

The polygon vertices in local coordinates.
public Vec2[],Box2DX.Common Vertices
return Box2DX.Common.Vec2[]