Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

A bounds class with min and max values. Implementing IBounds.

requires

XYCoords

requires

Vertex

requires

IBounds

Hierarchy

  • Bounds

Implements

Index

Constructors

constructor

Properties

Readonly height

height: number
member

{number}

memberof

Bounds

instance

Readonly max

member

{XYCoords}

memberof

Bounds

instance

Readonly min

member

{XYCoords}

memberof

Bounds

instance

Readonly width

width: number
member

{number}

memberof

Bounds

instance

Methods

getCenter

toPolygon

  • Convert this rectangular bounding box to a polygon with four vertices.

    method

    toPolygon

    instance
    memberof

    Bounds

    Returns Polygon

    This bound rectangle as a polygon.

toString

  • toString(): string
  • Convert these bounds to a human readable form.

    Note: the returned format might change in the future, so please do not rely on the returned string format.

    method

    toString

    instance
    memberof

    Bounds

    Returns string

    Get these bounds in a human readable form.

Static computeFromVertices

  • Compute the minimal bounding box for a given set of vertices.

    An empty vertex array will return an empty bounding box located at (0,0).

    static
    method

    computeFromVertices

    memberof

    Bounds

    Parameters

    • vertices: Array<Vertex>

      The set of vertices you want to get the bounding box for.

    Returns Bounds

    The minimal Bounds for the given vertices.

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc