Class Fz2D.BBox
| Defined in: | src/scene/bbox.coffee |
Overview
Public: BBox
Instance Method Summary
- ::constructor(x, y, w, h) Constructor
- ::contains(p) Determines if a point is inside the rectangle.
- ::equals(r) Compares the rectangle to another rectangle.
- ::isNull() Returns true if the rectangle is null, otherwise false.
- ::overlaps(r) Determines if the rectangle overlaps another rectangle.
- ::set(x, y, w, h) Sets the position and size.
- ::setPos(x, y) Sets the position of the rectangle.
- ::setSize(w, h) Sets the size of the rectangle.
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
Instance Method Details
::contains(p) Source
Public: Determines if a point is inside the rectangle.
p - Fz2D.Vec2
Returns true or false.
::equals(r) Source
Public: Compares the rectangle to another rectangle.
r - Fz2D.BBox
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.
::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
::setPos(x, y) Source
Public: Sets the position of the rectangle.
x - position on the X axis
y - position on the Y axis
::setSize(w, h) Source
Public: Sets the size of the rectangle.
w - width
h - height