Edge class providing internal details of Polygon.

Constructor

new()

@private

Variables

@:value(null)zpp_inner:ZPP_Edge = null

@private

read onlypolygon:Polygon

Reference to Polygon this Edge belongs to.

read onlylocalNormal:Vec2

Normal of edge in local coordinates.

This Vec2 is immutable.

read onlyworldNormal:Vec2

Normal of edge in world coordinates.

This Vec2 is immutable, and may be accessed even if the related Polygon is not part of a Body but queries to its values will result in a debug build error.

read onlylength:Float

Length of edge.

read onlylocalProjection:Float

Local projection of polygon onto edge axis.

read onlyworldProjection:Float

World projection of polygon to edge axis.

This value can only be accessed if related Polygon is part of a Body.

read onlylocalVertex1:Vec2

Reference to first local vertex for edge.

read onlylocalVertex2:Vec2

Reference to second local vertex for edge.

read onlyworldVertex1:Vec2

Reference to first world vertex for edge.

read onlyworldVertex2:Vec2

Reference to second world vertex for edge.

Methods

@:keeptoString():String

@private