Box3 (struct)¶
The Box3 represents a 3 dimensional bounding box. It uses Vec3 types for each of the 2 elements.
参考
/*
** Example: Construct Box3
*/
// create a box3
Vec3 min(0.0, 0.0, 0.0);
Vec3 max(1.0, 1.0, 1.0);
Box3 box(min, max);
Methods¶
Box3 ( in Box3 other ) | |
Box3 ( in Vec3 min, in Vec3 max ) | |
Box3 () | |
Box3 | affineTransform ? ( in Mat44 mat44 ) |
Vec3 | center ? () |
Box3 | clone ? () |
Vec3 | diagonal ? () |
Scalar | diameter ? () |
UInt32 | hash ? () |
Boolean | isEmpty ? () |
Boolean | isInfinite ? () |
merge ! ( in Box3 v ) | |
merge ! ( in Vec3 v ) | |
setEmpty ! () | |
setInfinite ! () |
Methods in detail¶
copy constructor
Box3 ( in Vec3 min, in Vec3 max )
Constructor from vectors
Box3 ()
Default constructor
Box3 Box3.affineTransform? ( in Mat44 mat44 )
Similar to ‘Box3 * (Mat44 mat44, Box3 b)’, but optimized for affine transforms (SRT)
Returns center of this box. Note that this in not valid for an empty box.
clone method
Returns diagonal (vector from min to max) of this box. Note that this in not valid for an empty box.
Returns the diameter of this box, which is the distance from min to max.
Hash for this value
Boolean Box3.isEmpty? ()
Returns true if this box has no content
Boolean Box3.isInfinite? ()
Returns true if this box is infinite
Merges the given box into this box
Merges the given vector into this box
Box3.setEmpty! ()
Setting this box to an empty box
Box3.setInfinite! ()
Setting this box to an infinite box