Class twodee.BoundingBox
A bounding box.
Defined in: BoundingBox.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Constructs a new bounding box.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
twodee.BoundingBox.counter
Instance counter.
|
Method Attributes | Method Name and Description |
---|---|
collidesWith(other)
Checks if this bounding box collides with the specified other bounding
box.
|
|
Returns the height of the bounding box.
|
|
getWidth()
Returns the width of the bounding box.
|
|
reset()
Resets the bounding box to no bounds.
|
|
update(v)
Updates the bounding box with the specified vector
|
Field Detail
<static>
twodee.BoundingBox.counter
Instance counter.
Method Detail
{boolean}
collidesWith(other)
Checks if this bounding box collides with the specified other bounding
box.
- Parameters:
- {twodee.BoundingBox} other
- The other bounding box
- Returns:
- {boolean} True if bounding boxes collide, false if not
{number}
getHeight()
Returns the height of the bounding box.
- Returns:
- {number} The bounding box height
{number}
getWidth()
Returns the width of the bounding box.
- Returns:
- {number} The bounding box width
reset()
Resets the bounding box to no bounds.
update(v)
Updates the bounding box with the specified vector
- Parameters:
- {twodee.Vector} v
- The vector