Simox  2.3.50
VirtualRobot::BoundingBox Class Reference

Public Member Functions

 BoundingBox ()
 
 BoundingBox (const std::vector< Eigen::Vector3f > &p)
 
bool planeGoesThrough (const VirtualRobot::MathTools::Plane &p)
 
std::vector< Eigen::Vector3f > getPoints () const
 
void print ()
 Print some info. More...
 
void addPoints (const std::vector< Eigen::Vector3f > &p)
 
void addPoints (const BoundingBox &bbox)
 
void addPoint (const Eigen::Vector3f &p)
 
Eigen::Vector3f getMin () const
 The axis oriented minimum value. More...
 
Eigen::Vector3f getMax () const
 The axis oriented maximum value. More...
 
void clear ()
 set min/max to zero. More...
 
void transform (Eigen::Matrix4f &pose)
 
void scale (Eigen::Vector3f &scaleFactor)
 
std::string toXML (int tabs=2, bool skipMatrixTag=false)
 

Protected Attributes

Eigen::Vector3f min
 
Eigen::Vector3f max
 

Friends

class CollisionChecker
 

Detailed Description

An axis oriented bounding box. Todo: Some parts of this class are similar to MathTools::OOBB.

Constructor & Destructor Documentation

VirtualRobot::BoundingBox::BoundingBox ( )
VirtualRobot::BoundingBox::BoundingBox ( const std::vector< Eigen::Vector3f > &  p)

Member Function Documentation

void VirtualRobot::BoundingBox::addPoint ( const Eigen::Vector3f &  p)

Consider this point for min/max calculation

void VirtualRobot::BoundingBox::addPoints ( const std::vector< Eigen::Vector3f > &  p)

Consider these points for min/max calculation

void VirtualRobot::BoundingBox::addPoints ( const BoundingBox bbox)

Consider these points for min/max calculation

void VirtualRobot::BoundingBox::clear ( )

set min/max to zero.

Eigen::Vector3f VirtualRobot::BoundingBox::getMax ( ) const

The axis oriented maximum value.

Eigen::Vector3f VirtualRobot::BoundingBox::getMin ( ) const

The axis oriented minimum value.

std::vector< Eigen::Vector3f > VirtualRobot::BoundingBox::getPoints ( ) const

Returns 8 points that define the bounding box

bool VirtualRobot::BoundingBox::planeGoesThrough ( const VirtualRobot::MathTools::Plane p)

Returns true, if plane "hits" this bounding box.

void VirtualRobot::BoundingBox::print ( )

Print some info.

void VirtualRobot::BoundingBox::scale ( Eigen::Vector3f &  scaleFactor)
std::string VirtualRobot::BoundingBox::toXML ( int  tabs = 2,
bool  skipMatrixTag = false 
)
void VirtualRobot::BoundingBox::transform ( Eigen::Matrix4f &  pose)

Applies transformation to this bbox. Reorders min and max values according to pose.

Friends And Related Function Documentation

friend class CollisionChecker
friend

Field Documentation

Eigen::Vector3f VirtualRobot::BoundingBox::max
protected
Eigen::Vector3f VirtualRobot::BoundingBox::min
protected