Class Fz2D.BBox

Defined in: src/scene/bbox.coffee

Overview

Public: BBox

Instance Method Summary

Constructor Details

::constructor(x, y, w, h) Source

Public: Constructor x - position on the X axis y - position on the Y axis w - width h - height

Parameters:

  • xposition on the X axis
  • yposition on the Y axis
  • wwidth
  • hheight

Instance Method Details

::contains(p) Source

Public: Determines if a point is inside the rectangle. p - Fz2D.Vec2 Returns true or false.

Parameters:

Returns:

  • Returns true or false.

::equals(r) Source

Public: Compares the rectangle to another rectangle. r - Fz2D.BBox Returns the result of the comparison.

Parameters:

Returns:

  • Returns the result of the comparison.

::isNull() Source

Public: Returns true if the rectangle is null, otherwise false.

::overlaps(r) Source

Public: Determines if the rectangle overlaps another rectangle. r - Fz2D.BBox Returns true or false.

Parameters:

Returns:

  • Returns true or false.

::set(x, y, w, h) Source

Public: Sets the position and size. x - position on the X axis y - position on the Y axis w - width h - height

Parameters:

  • xposition on the X axis
  • yposition on the Y axis
  • wwidth
  • hheight

::setPos(x, y) Source

Public: Sets the position of the rectangle. x - position on the X axis y - position on the Y axis

Parameters:

  • xposition on the X axis
  • yposition on the Y axis

::setSize(w, h) Source

Public: Sets the size of the rectangle. w - width h - height

Parameters:

  • wwidth
  • hheight