WallEndpoint

WallEndpoint

A special subclass of PIXI.Point which is used for modeling Wall endpoints. A wall endpoint must have integer coordinates.

Constructor

new WallEndpoint()

Properties:
Name Type Description
x number

The integer x-coordinate

y number

The integer y-coordinate

Extends

  • PIXI.Point

Members

_c :Object

An intermediate variable used to cache the continuation attributes for a certain point

Type:
  • Object

_r :number

An intermediate variable used to store the proportional distance of this point from a SightRay origin

Type:
  • number

angle :number

The angle between this point and the polygon origin

Type:
  • number

isEndpoint :boolean

Record whether this point is the endpoint of any Wall

Type:
  • boolean

isMidpoint :boolean

Record whether this point is a midpoint of any wall?

Type:
  • boolean

isTerminal :boolean

Record whether this point is the termination of the Ray

Type:
  • boolean

key :number

Express the point as a 32-bit integer with 16 bits allocated to x and 16 bits allocated to y

Type:
  • number

types :Object

Aggregate the maximum of each wall restriction type

Type:
  • Object

walls :Set.<Wall>

Record the set of walls which connect to this Endpoint

Type:

Methods

(static) getKey(x, y) → {number}

Encode a x/y coordinate as a 32-bit integer

Parameters:
Name Type Description
x number

The x-coordinate

y number

The y-coordinate

Returns:
Type
number

equals(other) → {boolean}

Does this endpoint equal some other endpoint?

Parameters:
Name Type Description
other Point

Some other point with x and y coordinates

Returns:

Are the points equal?

Type
boolean

isLimited(type) → {boolean}

Is this point one that provides only limited perspective?

Parameters:
Name Type Description
type string

The perspective type being tested

Returns:

Is perspective limited?

Type
boolean