Class: Face

(protected) Face(dcel)

The face class. This represents a polygon area in the DCEL.

Constructor

(protected) new Face(dcel)

Create a new face.
Parameters:
Name Type Description
dcel DCEL The DCEL instance.
Source:

Members

aabb :AABB

Get the AABB of the face.
Type:
Source:

area :number

Get the area of the face.
Type:
  • number
Source:

areaExceptHoles :number

Get the area of the face except holes.
Type:
  • number
Source:

external :boolean

Whether this is an external face. (area <= 0)
Type:
  • boolean
Source:

holes :Array.<Face>

Get the holes of the face.
Type:
Source:

(readonly) id :number

Type:
  • number
Source:

internal :boolean

Whether this is an internal face. (area > 0)
Type:
  • boolean
Source:

vertexlist :Array.<Vertex>

Get vertex list of the face. If this face is internal, vertex order is ccw. If this face is external, vertex order is cw.
Type:
Source:

Methods

(protected) dirty()

Mark the face as dirty.
Source:

(protected) dispose()

Dispose the face.
Source:

equals(f) → {boolean}

Whether the face equals the target face.
Parameters:
Name Type Description
f Face The target face.
Source:
Returns:
- True if the face equals the target face, false otherwise.
Type
boolean