Home Reference Source Repository
public class | source

PolygonEdge

Small class for precomuting some useful information about an edge of a polygon - the line, length, midpoint, normal. This class isn't exposed directly by the module, but is used in the return type of phaserTiledHull.

Constructor Summary

Public Constructor
public

constructor(line: *, hullIndex: *)

Member Summary

Public Members
public
public

line: Phaser.Line

The line that makes up the edge

public

midpoint: Phaser.Point

public

normal: Phaser.Point

Outward-facing normal vector as a point, normalized to unit length

public

Identifies which hull index this edge is a part of

Public Constructors

public constructor(line: *, hullIndex: *) source

Params:

NameTypeAttributeDescription
line *
hullIndex *

Public Members

public length: number source

public line: Phaser.Line source

The line that makes up the edge

public midpoint: Phaser.Point source

public normal: Phaser.Point source

Outward-facing normal vector as a point, normalized to unit length

public shapeId: number source

Identifies which hull index this edge is a part of