Box3 (struct)

The Box3 represents a 3 dimensional bounding box. It uses Vec3 types for each of the 2 elements.

参考

Box2

/*
** 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);

Box3 Box3 Box3

Members

Vec3 min  
Vec3 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 ! ()

Operators

Box3 = ( Param other )

Methods in detail

Box3 ( in Box3 other )

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)


Vec3 Box3.center? ()

Returns center of this box. Note that this in not valid for an empty box.


Box3 Box3.clone? ()

clone method


Vec3 Box3.diagonal? ()

Returns diagonal (vector from min to max) of this box. Note that this in not valid for an empty box.


Scalar Box3.diameter? ()

Returns the diameter of this box, which is the distance from min to max.


UInt32 Box3.hash? ()

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


Box3.merge! ( in Box3 v )

Merges the given box into this box


Box3.merge! ( in Vec3 v )

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

Operators in detail

Box3 = ( Param other )

Merges another box to this one