ALBA
|
#include <albaOBB.h>
Public Member Functions | |
albaOBB () | |
albaOBB (double source[6]) | |
~albaOBB () | |
bool | Equals (float bounds[6]) const |
bool | Equals (double bounds[6]) const |
bool | Equals (albaOBB &bounds) const |
bool | Equals (albaOBB *bounds) |
bool | IsValid () const |
void | Reset () |
void | DeepCopy (double bounds[6]) |
void | DeepCopy (float bounds[6]) |
void | DeepCopy (albaOBB *) |
void | DeepCopy (albaOBB &source) |
void | CopyTo (double target[6]) const |
void | CopyTo (float target[6]) const |
void | ApplyTransform () |
void | ApplyTransform (albaOBB &newbounds) |
void | ApplyTransform (const albaMatrix &mat) |
void | MergeBounds (albaOBB &bounds) |
bool | IsInside (double point[3]) const |
bool | IsInside (float point[3]) const |
bool | IsInside (double x, double y, double z) const |
void | GetDimensions (float dims[3]) const |
void | GetDimensions (double dims[3]) const |
void | GetCenter (float center[3]) const |
void | GetCenter (double center[3]) const |
void | SetCenter (double center[3]) |
void | SetCenter (float center[3]) |
void | SetDimensions (double dims[3]) |
void | SetDimensions (float dims[3]) |
double | GetWidth () const |
double | GetHeight () const |
double | GetDepth () const |
void | SetOrientation (double rx, double ry, double rz) |
void | GetOrientation (double rxyz[3]) |
virtual void | Print (std::ostream &os, const int tabs=0) const |
Public Member Functions inherited from albaTimeStamped | |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
Static Public Member Functions | |
static albaOBB * | New () |
static void | ApplyTransform (const albaMatrix &mat, albaOBB &newbounds) |
static void | MergeBounds (double b1[6], double b2[6]) |
Public Attributes | |
albaMatrix | m_Matrix |
double | m_Bounds [6] |
Additional Inherited Members | |
Protected Attributes inherited from albaTimeStamped | |
albaMTime | m_MTime |
This class simply stores a Box boundary (i.e.
an array of 6 doubles). This class stores a Box Boundary (i.e. array of 6 double), plus a Modified timestamp of the boundary to be used when re-computing.
albaOBB::albaOBB | ( | ) |
albaOBB::albaOBB | ( | double | source[6] | ) |
albaOBB::~albaOBB | ( | ) |
bool albaOBB::Equals | ( | float | bounds[6] | ) | const |
Return 1 if the two bounds are equivalent.
Use the float overload to compare with VTK bounds, since VTK manages bounds as floats!
bool albaOBB::Equals | ( | double | bounds[6] | ) | const |
bool albaOBB::Equals | ( | albaOBB & | bounds | ) | const |
|
inline |
|
inline |
void albaOBB::Reset | ( | ) |
Reset this object bounds to an invalid value [0,-1,0,-1,0,-1].
void albaOBB::DeepCopy | ( | double | bounds[6] | ) |
Copy another bounds from another object.
void albaOBB::DeepCopy | ( | float | bounds[6] | ) |
void albaOBB::DeepCopy | ( | albaOBB * | ) |
|
inline |
Definition at line 70 of file albaOBB.h.
References DeepCopy().
Referenced by DeepCopy().
void albaOBB::CopyTo | ( | double | target[6] | ) | const |
void albaOBB::CopyTo | ( | float | target[6] | ) | const |
|
inline |
Apply the internally stored transform to the bounding box, recompute the internally stored bounding box.
Definition at line 77 of file albaOBB.h.
References ApplyTransform().
Referenced by ApplyTransform().
|
inline |
Apply the internally stored transform to the bounding box, recompute the bounding box and stores new BBOx in the given object.
This version doesn't change the internal representation but simply return the result in 'newbounds'
Definition at line 83 of file albaOBB.h.
References ApplyTransform().
Referenced by ApplyTransform().
|
static |
Apply the given transform to the internal bounds (do not concatenate to the internal Matrix).
|
inline |
Definition at line 89 of file albaOBB.h.
References ApplyTransform().
Referenced by ApplyTransform().
void albaOBB::MergeBounds | ( | albaOBB & | bounds | ) |
Merge this objects's bounds with the given one.
If one of the two bounds is invalid the other one is chosen.
|
inline |
|
inline |
|
static |
This is a static function to merge two different space bounds.
The two bounds are merged and the result is placed in the first argument.
void albaOBB::GetDimensions | ( | float | dims[3] | ) | const |
return dimensions of this box
void albaOBB::GetDimensions | ( | double | dims[3] | ) | const |
return dimensions of this box
void albaOBB::GetCenter | ( | float | center[3] | ) | const |
return center of the box
void albaOBB::GetCenter | ( | double | center[3] | ) | const |
return center of the box
void albaOBB::SetCenter | ( | double | center[3] | ) |
translate the box to the new center
void albaOBB::SetCenter | ( | float | center[3] | ) |
translate the box to the new center
void albaOBB::SetDimensions | ( | double | dims[3] | ) |
set dimensions of the box preserving its center
void albaOBB::SetDimensions | ( | float | dims[3] | ) |
set dimensions of the box preserving its center
double albaOBB::GetWidth | ( | ) | const |
return the X dimension
double albaOBB::GetHeight | ( | ) | const |
return the Y dimension
double albaOBB::GetDepth | ( | ) | const |
return the Z dimension
void albaOBB::SetOrientation | ( | double | rx, |
double | ry, | ||
double | rz | ||
) |
set orientation of the internal matrix
void albaOBB::GetOrientation | ( | double | rxyz[3] | ) |
extract orientation from internal matrix
|
virtual |
dump the bounding box
albaMatrix albaOBB::m_Matrix |