56 bool IsValid()
const {
return (m_Bounds[0]<=m_Bounds[1] && \
57 m_Bounds[2]<=m_Bounds[3] && \
58 m_Bounds[4]<=m_Bounds[5]); \
98 bool IsInside(
double point[3])
const;
99 bool IsInside(
float point[3])
const;
100 bool IsInside(
double x,
double y,
double z)
const;
145 virtual void Print(std::ostream& os,
const int tabs=0)
const;
157 return IsInside(point[0],point[1],point[2]);
164 return IsInside(point[0],point[1],point[2]);
171 return ((x>=m_Bounds[0])&&(x<=m_Bounds[1])&& \
172 (y>=m_Bounds[2])&&(y<=m_Bounds[3])&& \
173 (z>=m_Bounds[4])&&(z<=m_Bounds[5]));
albaBase - the pourpose of this class is just to groups utilities classes
albaMatrix - Time stamped 4x4 Matrix.
This class simply stores a Box boundary (i.e.
double GetDepth() const
return the Z dimension
double GetWidth() const
return the X dimension
void SetOrientation(double rx, double ry, double rz)
set orientation of the internal matrix
void GetOrientation(double rxyz[3])
extract orientation from internal matrix
void GetDimensions(double dims[3]) const
return dimensions of this box
void GetCenter(double center[3]) const
return center of the box
void Reset()
Reset this object bounds to an invalid value [0,-1,0,-1,0,-1].
void DeepCopy(double bounds[6])
Copy another bounds from another object.
void GetCenter(float center[3]) const
return center of the box
void ApplyTransform(const albaMatrix &mat)
static void MergeBounds(double b1[6], double b2[6])
This is a static function to merge two different space bounds.
void DeepCopy(albaOBB &source)
bool Equals(albaOBB &bounds) const
void SetDimensions(double dims[3])
set dimensions of the box preserving its center
bool Equals(double bounds[6]) const
static void ApplyTransform(const albaMatrix &mat, albaOBB &newbounds)
Apply the given transform to the internal bounds (do not concatenate to the internal Matrix).
virtual void Print(std::ostream &os, const int tabs=0) const
dump the bounding box
void GetDimensions(float dims[3]) const
return dimensions of this box
void DeepCopy(float bounds[6])
void ApplyTransform(albaOBB &newbounds)
Apply the internally stored transform to the bounding box, recompute the bounding box and stores new ...
albaOBB(double source[6])
bool IsValid() const
Return true if the BBox is valid.
void CopyTo(double target[6]) const
void MergeBounds(albaOBB &bounds)
Merge this objects's bounds with the given one.
void SetDimensions(float dims[3])
set dimensions of the box preserving its center
void SetCenter(float center[3])
translate the box to the new center
void ApplyTransform()
Apply the internally stored transform to the bounding box, recompute the internally stored bounding b...
albaMatrix m_Matrix
the pose matrix of the OBB
double GetHeight() const
return the Y dimension
bool Equals(float bounds[6]) const
Return 1 if the two bounds are equivalent.
void CopyTo(float target[6]) const
bool Equals(albaOBB *bounds)
void SetCenter(double center[3])
translate the box to the new center
bool IsInside(double point[3]) const
Return true if the point is inside the bounds.
class acting as an interface for timestamped objects This object simply defines few methods for manag...