30 #ifndef __BOUNDING_BOX_H__ 31 #define __BOUNDING_BOX_H__ 42 #include <yarp/sig/Vector.h> 43 #include <yarp/math/Math.h> 44 #include <boost/thread/thread.hpp> 45 #include "pcl/common/common_headers.h" 46 #include <pcl/console/parse.h> 47 #include <pcl/point_types.h> 48 #include <pcl/surface/convex_hull.h> 49 #include <pcl/visualization/pcl_visualizer.h> 50 #include <iCub/data3D/Box3D.h> 63 iCub::data3D::Box3D boundingBox;
64 yarp::sig::Vector findIndexes(
const yarp::sig::Matrix &corner_i);
65 yarp::sig::Matrix convertCorners();
78 BoundingBox(
const iCub::data3D::Box3D &boundingBox);
96 std::vector<iCub::data3D::PointXYZ>
getCorners();
102 void setCorners(
const std::vector<iCub::data3D::PointXYZ> &corners);
122 yarp::sig::Vector
getDim();
130 void getAxis(yarp::sig::Vector &x, yarp::sig::Vector &y, yarp::sig::Vector &z);
143 void drawBoundingBox(boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer,
int viewport=0);
yarp::sig::Vector getCenter()
Return the center of the bounding box.
The Definition of the BoundingBox class.
BoundingBox()
Default Constructor.
yarp::sig::Matrix getOrientation()
Return the orientation of the Box3D structure.
void setCorners(const std::vector< iCub::data3D::PointXYZ > &corners)
Set the corners of the bounding box.
iCub::data3D::Box3D getBoundingBox()
Return the Box3D structure underline the bounding box.
void setOrientation(const yarp::sig::Matrix &orientation)
Modify the orientation of the bounding box.
yarp::sig::Vector getDim()
Return the dimension of the principal axes, in the same order of the getAxis method.
void setBoundingBox(const iCub::data3D::Box3D &boundingBox)
Set a Box3D inside the BoundingBox wrapper.
void getAxis(yarp::sig::Vector &x, yarp::sig::Vector &y, yarp::sig::Vector &z)
Provide the principal axes of the bounding box.
void drawBoundingBox(boost::shared_ptr< pcl::visualization::PCLVisualizer > viewer, int viewport=0)
Draw a 3D box in a PCLVisualizer window.
std::vector< iCub::data3D::PointXYZ > getCorners()
Return the corners of the Box3D structure.