new $.oBox(left, top, right, bottom)
openHarmony/openHarmony_math.js, line 349
The $.oBox helper class - representing a 2D box.
Name | Type | Description |
---|---|---|
left |
float | left horizontal bound |
top |
float | top vertical bound |
right |
float | right horizontal bound |
bottom |
float | bottom vertical bound |
Properties:
Name | Type | Description |
---|---|---|
left |
float | left horizontal bound |
top |
float | top vertical bound |
right |
float | right horizontal bound |
bottom |
float | bottom vertical bound |
Members
-
center$.oPoint
-
The center of the box.
-
heightfloat
-
The height of the box.
-
isEmptybool
-
Wether this box is empty or not (boxes start as empty when initialized).
-
widthfloat
-
The width of the box.
Methods
-
contains(box, partial)
openHarmony/openHarmony_math.js, line 430 -
Checks wether the box contains another $.oBox.
Name Type Default Description box
$.oBox The $.oBox to check for. partial
bool false optional wether to accept partially contained boxes. -
include(box)
openHarmony/openHarmony_math.js, line 417 -
Adds the input box to the bounds of the current $.oBox.
Name Type Description box
$.oBox The $.oBox to include. -
includeNodes(oNodeArray)
openHarmony/openHarmony_math.js, line 450 -
Adds the bounds of the nodes to the current $.oBox.
Name Type Description oNodeArray
Array.<oNode> An array of nodes to include in the box.