Box2 (struct)¶
The Box2 represents a 2 dimensional bounding box. It uses Vec2 types for each of the 2 elements.
参考
/*
** Example: Construct Box2
*/
// create a box2
Vec2 min(0.0, 0.0);
Vec2 max(1.0, 1.0);
Box2 box(min, max);
Methods¶
Box2 ( in Box2 other ) | |
Box2 ( in Vec2 min, in Vec2 max ) | |
Box2 () | |
Box2 | clone ? () |
UInt32 | hash ? () |
Boolean | intersects ? ( in Box2 that ) |
Boolean | isEmpty ? () |
merge ! ( in Box2 v ) | |
merge ! ( in Vec2 v ) | |
setEmpty ! () |
Methods in detail¶
copy constructor
Box2 ( in Vec2 min, in Vec2 max )
Constructor from vectors
Box2 ()
Default constructor
clone method
Hash for this value
Boolean Box2.intersects? ( in Box2 that )
Returns true if this Box2 intersects with that Box2
Boolean Box2.isEmpty? ()
Returns true if this box has no content
Merges the given Box2 value into this box
Merges the given Vec2 value into this box, expanding the Box2 accordingly
Box2.setEmpty! ()
setting this box to an empty box