Public Member Functions | |
| void | set (vec2 min, vec2 max) |
| Assign specific values. | |
| vec2 | center () |
| Return the center of the box. | |
| void | center (vec2 value) |
| Change the center of the box. | |
| bit | concontains (vec2 point) |
| Return whether this point is conservatively within the box. | |
| bit | concontains (box2 box) |
| Return whether this box conservatively envelopes b (greater than rather than greater than or equal to) . | |
| bit | conoverlaps (box2 box) |
| Return whether the box conservatively overlaps the other box. | |
| bit | contains (vec2 point) |
| Return whether the point is within the box. | |
| bit | contains (box2 box) |
| Return whether this box fully envelopes b. | |
| vec2 | dim () |
| Get the dimensions of the box. | |
| void | dim (vec2 value) |
| Alter the dimensions of the box without changing the center. | |
| void | ensure (vec2 point) |
| Ensure that the bounds contain this point. | |
| void | ensure (box2 box) |
| Ensure that the bounds contain this box. | |
| bit | isnan () |
| Return whether this is an uninitialised box. | |
| bit | overlaps (box2 box) |
| Return whether this box overlaps the other box. | |
| vec2 | nearestPoint (vec2 vector) |
| Return the nearest point in the box to the vector. | |
| vec2 | corner (uint index) |
| Return an indexed corner of the box. | |
| char[] | toString () |
| Convert to string. | |
Operator overloading. | |
| box2 | add (vec2 value) |
| box2 = (box2 + vec2) | |
| box2 | addass (vec2 value) |
| box2 = (box2 += vec2) | |
| box2 | sub (vec2 value) |
| box2 = (box2 - vec2) | |
| box2 | subass (vec2 value) |
| box2 = (box2 -= vec2) | |
Static Public Member Functions | |
| box2 | create (vec2 vector) |
| Create the box with a specific value for the starting and ending bounds. | |
| box2 | create (vec2 min, vec2 max) |
| Create a box with specific values. | |
| box2 | fromCenter (vec2 center, vec2 length) |
| Create a box by specifying the center and the length of each side. | |
Public Attributes | |
| vec2 | min |
| Starting bounds. | |
| vec2 | max |
| Ending bounds. | |
Related Functions | |
| (Note that these are not member functions.) | |
| box2 | abox2 (vec2 vector) |
| Create a box with a specific bound. | |
| box2 | abox2 (vec2 min, vec2 max) |
| Create a box with specific bounds. | |
|
|
Return an indexed corner of the box.
|
1.3.2