HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_BoundingBoxT< T > Class Template Reference

Axis-aligned bounding box (AABB). More...

#include <GEO_Detail.h>

Public Types

using this_type = UT_BoundingBoxT< T >
 

Public Member Functions

 UT_BoundingBoxT ()
 
 UT_BoundingBoxT (T axmin, T aymin, T azmin, T axmax, T aymax, T azmax)
 
 UT_BoundingBoxT (const UT_Vector3T< T > &lowerbound, const UT_Vector3T< T > &upperbound)
 
template<typename S >
 UT_BoundingBoxT (const UT_BoundingBoxT< S > &bbox)
 
template<typename S >
UT_BoundingBoxToperator= (const UT_BoundingBoxT< S > &bbox)
 
T operator() (unsigned m, unsigned n) const
 
Toperator() (unsigned m, unsigned n)
 
bool operator== (const UT_BoundingBoxT< T > &bbox) const
 
bool operator!= (const UT_BoundingBoxT< T > &bbox) const
 
bool isEqual (const UT_BoundingBoxT< T > &bbox, T tol=SYS_FTOLERANCE_R) const
 
T xmin () const
 
T xmax () const
 
T ymin () const
 
T ymax () const
 
T zmin () const
 
T zmax () const
 
UT_Vector3T< Tminvec () const
 
UT_Vector3T< Tmaxvec () const
 
int isInside (const UT_Vector3T< T > &pt) const
 
int isInside (const UT_Vector4T< T > &pt) const
 
int isInside (T x, T y, T z) const
 
int isInside (const UT_BoundingBoxT< T > &bbox) const
 
int isLineInside (const UT_Vector3T< T > &v0, const UT_Vector3T< T > &idir) const
 
T approxLineDist2 (const UT_Vector3T< T > &v0, const UT_Vector3T< T > &dir) const
 
SYS_FORCE_INLINE bool isValid () const
 Check whether the bounding box contains at least one point. More...
 
SYS_FORCE_INLINE void makeInvalid ()
 
SYS_FORCE_INLINE bool isInvalidFast () const
 
void setBounds (T x_min, T y_min, T z_min, T x_max, T y_max, T z_max)
 
void initMaxBounds ()
 Initialize the box to the largest size. More...
 
SYS_FORCE_INLINE void initBounds ()
 
void initBounds (const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
 
SYS_FORCE_INLINE void initBounds (const UT_Vector3T< T > &pt)
 Initialize zero-sized bounds at the location of the point given by pt. More...
 
void initBounds (const UT_Vector4T< T > &pt)
 Initialize zero-sized bounds at the location of the point given by pt. More...
 
SYS_FORCE_INLINE void initBounds (T x, T y, T z)
 
void initBounds (const fpreal32 *v)
 Initialize zero-sized bounds at the location of the point given by v. More...
 
void initBounds (const fpreal64 *v)
 Initialize zero-sized bounds at the location of the point given by v. More...
 
void initBounds (const UT_BoundingBoxT< T > &box)
 Initialize the bounds to the same as given by box. More...
 
void enlargeBounds (const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
 
SYS_FORCE_INLINE void enlargeBounds (const UT_Vector3T< T > &pt)
 Enlarge the existing bounds to encompass the point given by pt. More...
 
void enlargeBounds (const UT_Vector4T< T > &pt)
 Enlarge the existing bounds to encompass the point given by pt. More...
 
SYS_FORCE_INLINE void enlargeBounds (T x, T y, T z)
 
void enlargeBounds (const fpreal32 *v)
 Enlarge the existing bounds to encompass the point given in v. More...
 
void enlargeBounds (const fpreal64 *v)
 Enlarge the existing bounds to encompass the point given in v. More...
 
SYS_FORCE_INLINE void enlargeBounds (const UT_BoundingBoxT< T > &box)
 Enlarge the existing bounds to encompass the bounds given by box. More...
 
SYS_FORCE_INLINE void expandBounds (T relative, T absolute)
 
SYS_FORCE_INLINE void expandBounds (T dltx, T dlty, T dlyz)
 
void enlargeFloats (int bits=1, T min=1e-5)
 
void clipBounds (const UT_BoundingBoxT< T > &box)
 Find the intersections of two bounding boxes. More...
 
void splitLeft (UT_BoundingBoxT< T > &box, int axis, T split)
 
void splitRight (UT_BoundingBoxT< T > &box, int axis, T split)
 
template<typename MATRIX >
void transform (const MATRIX &mat)
 
template<typename MATRIX >
void transform (const MATRIX &mat, UT_BoundingBoxT< T > &newbbox) const
 
void translate (const UT_Vector3T< T > &delta)
 Adds the given translate to each component of the bounding box. More...
 
T xsize () const
 
T ysize () const
 
T zsize () const
 
T sizeX () const
 
T sizeY () const
 
T sizeZ () const
 
UT_Vector3T< Tsize () const
 
T sizeAxis (int axis) const
 
T sizeMax () const
 Return the size of the largest dimension. More...
 
T sizeMax (int &axis) const
 
UT_Vector3T< TminDistDelta (const UT_Vector3T< T > &p) const
 
UT_Vector3T< TminDistDelta (const UT_BoundingBoxT< T > &box) const
 
T minDist2 (const UT_Vector3T< T > &p) const
 
T minDist2 (const UT_BoundingBoxT< T > &box) const
 Minimum disance between two bboxes squared. More...
 
UT_Vector3T< TminDistToMaxOverlap (const UT_BoundingBoxT< T > &box) const
 
T getRadius () const
 Returns the radius of a sphere that would fully enclose the box. More...
 
int getOutCode (const UT_Vector3T< T > &pt) const
 Finds the out code of the point relative to this box: More...
 
T xcenter () const
 
T ycenter () const
 
T zcenter () const
 
T centerX () const
 
T centerY () const
 
T centerZ () const
 
T centerAxis (int axis) const
 
UT_Vector3T< Tcenter () const
 
T area () const
 
T volume () const
 
void addToMin (const UT_Vector3T< T > &vec)
 
void addToMax (const UT_Vector3T< T > &vec)
 
void scaleOffset (const UT_Vector3T< T > &scale, const UT_Vector3T< T > &offset)
 Scale then offset a bounding box. More...
 
int maxAxis () const
 
int minAxis () const
 
int intersectRay (const UT_Vector3T< T > &org, const UT_Vector3T< T > &dir, T tmax=1E17F, T *distance=0, UT_Vector3T< T > *nml=0) const
 
int intersectRange (const UT_Vector3T< T > &org, const UT_Vector3T< T > &dir, T &min, T &max) const
 
int intersectTube (const UT_Vector3T< T > &org, const UT_Vector3T< T > &dir, T radius, T tmin=-1E17f, T tmax=1E17f) const
 
int intersects (const UT_BoundingBoxT< T > &box) const
 
int computeIntersection (const UT_BoundingBoxT< T > &box)
 
void getBBoxPoints (UT_Vector3T< T >(&ptarray)[8]) const
 
void getBBoxPoints (UT_Vector4T< T >(&ptarray)[8]) const
 
template<typename MATRIX >
int getBBoxPoints (UT_Vector3T< T >(&ptarray)[8], const MATRIX &transform_matrix) const
 
void dump (const char *msg=0) const
 Dump the bounding box to stderr. The msg is printed before the bounds. More...
 
void dumpGeo (FILE *fp) const
 Dump the bounding box geometry to a draw file. More...
 
void setSerialized (const fpreal32 floats[6])
 
void setSerialized (const fpreal64 floats[6])
 
const TgetSerialized () const
 
const Tdata () const
 
Tdata ()
 
const Tbegin () const
 
const Tend () const
 
Tbegin ()
 
Tend ()
 
bool save (UT_JSONWriter &w) const
 
bool save (UT_JSONValue &v) const
 
bool load (UT_JSONParser &p)
 

Public Attributes

union {
   T   vals [3][2]
 
   T   myFloats [6]
 
}; 
 Here's the data for the bounding box. More...
 

Protected Member Functions

void outTo (std::ostream &os) const
 

Static Protected Member Functions

static bool SYSisEqual (int64 a, int64 b, int64)
 

Friends

std::ostream & operator<< (std::ostream &os, const UT_BoundingBoxT< T > &box)
 
uint64 hash () const
 Compute UT_BoundingBox hash. More...
 
std::size_t hash_value (const this_type &t)
 Compute UT_BoundingBox hash. More...
 

Detailed Description

template<typename T>
class UT_BoundingBoxT< T >

Axis-aligned bounding box (AABB).

Definition at line 43 of file GEO_Detail.h.

Member Typedef Documentation

template<typename T>
using UT_BoundingBoxT< T >::this_type = UT_BoundingBoxT<T>

Definition at line 22 of file UT_BoundingBox.h.

Constructor & Destructor Documentation

template<typename T>
UT_BoundingBoxT< T >::UT_BoundingBoxT ( )
inline

Definition at line 24 of file UT_BoundingBox.h.

template<typename T>
UT_BoundingBoxT< T >::UT_BoundingBoxT ( T  axmin,
T  aymin,
T  azmin,
T  axmax,
T  aymax,
T  azmax 
)
inline

Definition at line 27 of file UT_BoundingBox.h.

template<typename T>
UT_BoundingBoxT< T >::UT_BoundingBoxT ( const UT_Vector3T< T > &  lowerbound,
const UT_Vector3T< T > &  upperbound 
)
inline

Definition at line 33 of file UT_BoundingBox.h.

template<typename T>
template<typename S >
UT_BoundingBoxT< T >::UT_BoundingBoxT ( const UT_BoundingBoxT< S > &  bbox)
inline

Definition at line 45 of file UT_BoundingBox.h.

Member Function Documentation

template<typename T>
void UT_BoundingBoxT< T >::addToMax ( const UT_Vector3T< T > &  vec)
template<typename T>
void UT_BoundingBoxT< T >::addToMin ( const UT_Vector3T< T > &  vec)
template<typename T>
T UT_BoundingBoxT< T >::approxLineDist2 ( const UT_Vector3T< T > &  v0,
const UT_Vector3T< T > &  dir 
) const

Determine the minimum distance of the box to a line segment, or 0 if the line segment overlaps the box. v0 is one end-point of the line, and dir is the direction vector along the line. This method conservatively underestimates the distance, so the true line/box distance may be greater than the reported value.

template<typename T>
T UT_BoundingBoxT< T >::area ( ) const
template<typename T>
const T* UT_BoundingBoxT< T >::begin ( void  ) const
inline

Iterate over the data serially

Definition at line 182 of file UT_BoundingBox.h.

template<typename T>
T* UT_BoundingBoxT< T >::begin ( void  )
inline

Iterate over the data serially

Definition at line 184 of file UT_BoundingBox.h.

template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::center ( ) const
inline

Definition at line 357 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::centerAxis ( int  axis) const
inline

Definition at line 355 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::centerX ( ) const
inline

Definition at line 352 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::centerY ( ) const
inline

Definition at line 353 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::centerZ ( ) const
inline

Definition at line 354 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::clipBounds ( const UT_BoundingBoxT< T > &  box)

Find the intersections of two bounding boxes.

template<typename T>
int UT_BoundingBoxT< T >::computeIntersection ( const UT_BoundingBoxT< T > &  box)

Changes the bounds to be those of the intersection of this box and the supplied BBox. Returns 1 if intersects, 0 otherwise.

template<typename T>
const T* UT_BoundingBoxT< T >::data ( ) const
inline

Access to the serialized data

Definition at line 176 of file UT_BoundingBox.h.

template<typename T>
T* UT_BoundingBoxT< T >::data ( )
inline

Access to the serialized data

Definition at line 177 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::dump ( const char *  msg = 0) const

Dump the bounding box to stderr. The msg is printed before the bounds.

template<typename T>
void UT_BoundingBoxT< T >::dumpGeo ( FILE *  fp) const

Dump the bounding box geometry to a draw file.

template<typename T>
const T* UT_BoundingBoxT< T >::end ( void  ) const
inline

Iterate over the data serially

Definition at line 183 of file UT_BoundingBox.h.

template<typename T>
T* UT_BoundingBoxT< T >::end ( void  )
inline

Iterate over the data serially

Definition at line 185 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( const UT_Vector3T< T > &  min,
const UT_Vector3T< T > &  max 
)

Enlarge the existing bounds to encompass the bounds given by min and max.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( const UT_Vector3T< T > &  pt)

Enlarge the existing bounds to encompass the point given by pt.

Definition at line 491 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( const UT_Vector4T< T > &  pt)

Enlarge the existing bounds to encompass the point given by pt.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( T  x,
T  y,
T  z 
)

Enlarge the existing bounds to encompass the point defined by x, y, and z.

Definition at line 503 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( const fpreal32 v)
inline

Enlarge the existing bounds to encompass the point given in v.

Definition at line 249 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( const fpreal64 v)
inline

Enlarge the existing bounds to encompass the point given in v.

Definition at line 253 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::enlargeBounds ( const UT_BoundingBoxT< T > &  box)

Enlarge the existing bounds to encompass the bounds given by box.

Definition at line 515 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::enlargeFloats ( int  bits = 1,
T  min = 1e-5 
)

Perform a minimal enlargement of the floating point values in this bounding box. This enlargement guarantees that the new floating point values are always different from the prior ones. The number of mantissa bits to be changed can be adjusted using the bits parameter, and a minimum enlargement amount can be specified in min.

template<typename T>
void UT_BoundingBoxT< T >::expandBounds ( T  relative,
T  absolute 
)

Expand the bounding box on all axes, as a relative fraction of the current bbox dimensions, and/or using an absolute offset.

Definition at line 527 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::expandBounds ( T  dltx,
T  dlty,
T  dlyz 
)

Expand the bounding box on all sides using separate absolute offsets for each axis.

Definition at line 543 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::getBBoxPoints ( UT_Vector3T< T >(&)  ptarray[8]) const
template<typename T>
void UT_BoundingBoxT< T >::getBBoxPoints ( UT_Vector4T< T >(&)  ptarray[8]) const
template<typename T>
template<typename MATRIX >
int UT_BoundingBoxT< T >::getBBoxPoints ( UT_Vector3T< T >(&)  ptarray[8],
const MATRIX &  transform_matrix 
) const
template<typename T>
int UT_BoundingBoxT< T >::getOutCode ( const UT_Vector3T< T > &  pt) const

Finds the out code of the point relative to this box:

template<typename T>
T UT_BoundingBoxT< T >::getRadius ( ) const
inline

Returns the radius of a sphere that would fully enclose the box.

Definition at line 344 of file UT_BoundingBox.h.

template<typename T>
const T* UT_BoundingBoxT< T >::getSerialized ( ) const
inline

Set/Get bounds in "serialized" fashion. The serialized order is (xmin, xmax, ymin, ymax, zmin, zmax).

Definition at line 171 of file UT_BoundingBox.h.

template<typename T >
uint64 UT_BoundingBoxT< T >::hash ( ) const

Compute UT_BoundingBox hash.

Compute a hash

Definition at line 24 of file UT_BoundingBoxHash.h.

template<typename T >
void UT_BoundingBoxT< T >::initBounds ( )

Initialize the box such that

  • No points are contained in the box
  • The box occupies no position in space

Definition at line 452 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( const UT_Vector3T< T > &  min,
const UT_Vector3T< T > &  max 
)

Initialize the bounds with the bounds given in min and max. No check is made to ensure that min is smaller than max.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( const UT_Vector3T< T > &  pt)

Initialize zero-sized bounds at the location of the point given by pt.

Definition at line 467 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( const UT_Vector4T< T > &  pt)

Initialize zero-sized bounds at the location of the point given by pt.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( T  x,
T  y,
T  z 
)

Initialize zero-sized bounds at the location of the point defined by x, y, and z;

Definition at line 479 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( const fpreal32 v)
inline

Initialize zero-sized bounds at the location of the point given by v.

Definition at line 221 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( const fpreal64 v)
inline

Initialize zero-sized bounds at the location of the point given by v.

Definition at line 225 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::initBounds ( const UT_BoundingBoxT< T > &  box)

Initialize the bounds to the same as given by box.

template<typename T>
void UT_BoundingBoxT< T >::initMaxBounds ( )

Initialize the box to the largest size.

template<typename T>
int UT_BoundingBoxT< T >::intersectRange ( const UT_Vector3T< T > &  org,
const UT_Vector3T< T > &  dir,
T min,
T max 
) const
template<typename T>
int UT_BoundingBoxT< T >::intersectRay ( const UT_Vector3T< T > &  org,
const UT_Vector3T< T > &  dir,
T  tmax = 1E17F,
T distance = 0,
UT_Vector3T< T > *  nml = 0 
) const

Intersect a ray with the box. Returns 0 if no intersection found. distance will be set to the intersection distance (between 0 & tmax) The normal will also be set. The direction of the normal is indeterminant (to fix it, you might want to dot(dir, *nml) to check the orientation.

template<typename T>
int UT_BoundingBoxT< T >::intersects ( const UT_BoundingBoxT< T > &  box) const
template<typename T>
int UT_BoundingBoxT< T >::intersectTube ( const UT_Vector3T< T > &  org,
const UT_Vector3T< T > &  dir,
T  radius,
T  tmin = -1E17f,
T  tmax = 1E17f 
) const

This determines if the tube, capped at distances tmin & tmax, intersects this.

template<typename T>
bool UT_BoundingBoxT< T >::isEqual ( const UT_BoundingBoxT< T > &  bbox,
T  tol = SYS_FTOLERANCE_R 
) const
inline

Definition at line 91 of file UT_BoundingBox.h.

template<typename T>
int UT_BoundingBoxT< T >::isInside ( const UT_Vector3T< T > &  pt) const
template<typename T>
int UT_BoundingBoxT< T >::isInside ( const UT_Vector4T< T > &  pt) const
template<typename T>
int UT_BoundingBoxT< T >::isInside ( T  x,
T  y,
T  z 
) const
template<typename T>
int UT_BoundingBoxT< T >::isInside ( const UT_BoundingBoxT< T > &  bbox) const

Am I totally enclosed in the bounding box passed in ("intersects" method tests for partially inside)

template<typename T>
SYS_FORCE_INLINE bool UT_BoundingBoxT< T >::isInvalidFast ( ) const
inline

Efficient test for an invalid bounding box (one comparison instead of 3 for a valid bounding box). This only checks X, not Y or Z ranges, so only works if the box is fully invalid.

Definition at line 145 of file UT_BoundingBox.h.

template<typename T>
int UT_BoundingBoxT< T >::isLineInside ( const UT_Vector3T< T > &  v0,
const UT_Vector3T< T > &  idir 
) const

Determine whether a line intersects the box. v0 is one end-point of the line, and idir is the inverse direction vector along the line.

template<typename T >
bool UT_BoundingBoxT< T >::isValid ( void  ) const

Check whether the bounding box contains at least one point.

Definition at line 443 of file UT_BoundingBox.h.

template<typename T>
bool UT_BoundingBoxT< T >::load ( UT_JSONParser p)

Methods to serialize to a JSON stream. The vector is stored as an array of 6 reals (xmin, xmax, ymin, ymax, zmin, zmax)

template<typename T>
SYS_FORCE_INLINE void UT_BoundingBoxT< T >::makeInvalid ( )
inline

Definition at line 139 of file UT_BoundingBox.h.

template<typename T>
int UT_BoundingBoxT< T >::maxAxis ( ) const
template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::maxvec ( ) const
inline

Definition at line 111 of file UT_BoundingBox.h.

template<typename T>
int UT_BoundingBoxT< T >::minAxis ( ) const
template<typename T>
T UT_BoundingBoxT< T >::minDist2 ( const UT_Vector3T< T > &  p) const
inline

Returns minimum distance from point to bounding box squared. Returns 0 if point in bouding box.

Definition at line 333 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::minDist2 ( const UT_BoundingBoxT< T > &  box) const
inline

Minimum disance between two bboxes squared.

Definition at line 336 of file UT_BoundingBox.h.

template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::minDistDelta ( const UT_Vector3T< T > &  p) const

Returns the minimum delta vector from the point to the bounding box or between two bounding boxes.

template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::minDistDelta ( const UT_BoundingBoxT< T > &  box) const
template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::minDistToMaxOverlap ( const UT_BoundingBoxT< T > &  box) const

Returns the smallest absolute translation from this to box that produces the maximum overlap between the two boxes.

template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::minvec ( ) const
inline

Definition at line 109 of file UT_BoundingBox.h.

template<typename T>
bool UT_BoundingBoxT< T >::operator!= ( const UT_BoundingBoxT< T > &  bbox) const
inline

Definition at line 86 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::operator() ( unsigned  m,
unsigned  n 
) const
inline

Definition at line 67 of file UT_BoundingBox.h.

template<typename T>
T& UT_BoundingBoxT< T >::operator() ( unsigned  m,
unsigned  n 
)
inline

Definition at line 72 of file UT_BoundingBox.h.

template<typename T>
template<typename S >
UT_BoundingBoxT& UT_BoundingBoxT< T >::operator= ( const UT_BoundingBoxT< S > &  bbox)
inline

Definition at line 56 of file UT_BoundingBox.h.

template<typename T>
bool UT_BoundingBoxT< T >::operator== ( const UT_BoundingBoxT< T > &  bbox) const
inline

Definition at line 77 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::outTo ( std::ostream &  os) const
protected
template<typename T>
bool UT_BoundingBoxT< T >::save ( UT_JSONWriter w) const

Methods to serialize to a JSON stream. The vector is stored as an array of 6 reals (xmin, xmax, ymin, ymax, zmin, zmax)

template<typename T>
bool UT_BoundingBoxT< T >::save ( UT_JSONValue v) const

Methods to serialize to a JSON stream. The vector is stored as an array of 6 reals (xmin, xmax, ymin, ymax, zmin, zmax)

template<typename T>
void UT_BoundingBoxT< T >::scaleOffset ( const UT_Vector3T< T > &  scale,
const UT_Vector3T< T > &  offset 
)

Scale then offset a bounding box.

template<typename T>
void UT_BoundingBoxT< T >::setBounds ( T  x_min,
T  y_min,
T  z_min,
T  x_max,
T  y_max,
T  z_max 
)
inline

Definition at line 147 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::setSerialized ( const fpreal32  floats[6])
inline

Set/Get bounds in "serialized" fashion. The serialized order is (xmin, xmax, ymin, ymax, zmin, zmax).

Definition at line 161 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::setSerialized ( const fpreal64  floats[6])
inline

Set/Get bounds in "serialized" fashion. The serialized order is (xmin, xmax, ymin, ymax, zmin, zmax).

Definition at line 166 of file UT_BoundingBox.h.

template<typename T>
UT_Vector3T<T> UT_BoundingBoxT< T >::size ( void  ) const
inline

Definition at line 312 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::sizeAxis ( int  axis) const
inline

Definition at line 316 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::sizeMax ( ) const

Return the size of the largest dimension.

template<typename T>
T UT_BoundingBoxT< T >::sizeMax ( int axis) const

Return the size of the largest dimension, and store the dimension index in "axis"

template<typename T>
T UT_BoundingBoxT< T >::sizeX ( ) const
inline

Definition at line 308 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::sizeY ( ) const
inline

Definition at line 309 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::sizeZ ( ) const
inline

Definition at line 310 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::splitLeft ( UT_BoundingBoxT< T > &  box,
int  axis,
T  split 
)
inline

Splits a box into two disjoint subboxes at the given splitting point. This box is set to the left subbox for splitLeft() and the right subbox for splitRight().

Definition at line 283 of file UT_BoundingBox.h.

template<typename T>
void UT_BoundingBoxT< T >::splitRight ( UT_BoundingBoxT< T > &  box,
int  axis,
T  split 
)
inline

Definition at line 289 of file UT_BoundingBox.h.

template<typename T>
static bool UT_BoundingBoxT< T >::SYSisEqual ( int64  a,
int64  b,
int64   
)
inlinestaticprotected

Definition at line 435 of file UT_BoundingBox.h.

template<typename T>
template<typename MATRIX >
void UT_BoundingBoxT< T >::transform ( const MATRIX &  mat)
template<typename T>
template<typename MATRIX >
void UT_BoundingBoxT< T >::transform ( const MATRIX &  mat,
UT_BoundingBoxT< T > &  newbbox 
) const
template<typename T>
void UT_BoundingBoxT< T >::translate ( const UT_Vector3T< T > &  delta)

Adds the given translate to each component of the bounding box.

template<typename T>
T UT_BoundingBoxT< T >::volume ( ) const
inline

Definition at line 363 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::xcenter ( ) const
inline

Definition at line 349 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::xmax ( ) const
inline

Definition at line 103 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::xmin ( ) const
inline

Definition at line 102 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::xsize ( ) const
inline

Definition at line 305 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::ycenter ( ) const
inline

Definition at line 350 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::ymax ( ) const
inline

Definition at line 105 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::ymin ( ) const
inline

Definition at line 104 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::ysize ( ) const
inline

Definition at line 306 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::zcenter ( ) const
inline

Definition at line 351 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::zmax ( ) const
inline

Definition at line 107 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::zmin ( ) const
inline

Definition at line 106 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::zsize ( ) const
inline

Definition at line 307 of file UT_BoundingBox.h.

Friends And Related Function Documentation

template<typename T>
std::size_t hash_value ( const this_type t)
friend

Compute UT_BoundingBox hash.

Compute a hash

Definition at line 191 of file UT_BoundingBox.h.

template<typename T>
std::ostream& operator<< ( std::ostream &  os,
const UT_BoundingBoxT< T > &  box 
)
friend

Definition at line 427 of file UT_BoundingBox.h.

Member Data Documentation

union { ... }

Here's the data for the bounding box.

template<typename T>
T UT_BoundingBoxT< T >::myFloats[6]

Definition at line 402 of file UT_BoundingBox.h.

template<typename T>
T UT_BoundingBoxT< T >::vals[3][2]

Definition at line 401 of file UT_BoundingBox.h.


The documentation for this class was generated from the following files: