#include <cube.h>
Public Types | |
| typedef boost::shared_ptr< Cube > | Ptr |
Public Member Functions | |
| Cube (const Eigen::Vector3f &pos, const Eigen::Quaternionf &rot) | |
| Cube (const Eigen::Vector3f &pos, const Eigen::Quaternionf &rot, const Eigen::Vector3f &dimensions) | |
| Cube (const Eigen::Vector3f &pos, const Eigen::Quaternionf &rot, const std::vector< double > &dimensions) | |
| Cube (const Eigen::Vector3f &pos, const Line &line_a, const Line &line_b, const Line &line_c) | |
| Cube (const jsk_recognition_msgs::BoundingBox &box) | |
| std::vector< Segment::Ptr > | edges () |
| std::vector< Polygon::Ptr > | faces () |
| returns all the 6 faces as Polygon::Ptr. TODO: is it should be ConvexPolygon? More... | |
| std::vector< double > | getDimensions () const |
| ConvexPolygon::Ptr | intersectConvexPolygon (Plane &plane) |
| virtual Eigen::Vector3f | nearestPoint (const Eigen::Vector3f &p, double &distance) |
| compute minimum distance from point p to cube surface. More... | |
| void | setDimensions (const std::vector< double > &new_dimensions) |
| jsk_recognition_msgs::BoundingBox | toROSMsg () |
| Vertices | transformVertices (const Eigen::Affine3f &pose_offset) |
| returns vertices transformed by pose_offset. More... | |
| Vertices | vertices () |
| returns vertices as an array of Eigen::Vectro3f. The order of the vertices is: [1, 1, 1], [-1, 1, 1], [-1, -1, 1], [1, -1, 1], [1, 1, -1], [-1, 1, -1], [-1, -1, -1], [1, -1, -1]. More... | |
| virtual | ~Cube () |
Protected Member Functions | |
| virtual Polygon::Ptr | buildFace (const Eigen::Vector3f v0, const Eigen::Vector3f v1, const Eigen::Vector3f v2, const Eigen::Vector3f v3) |
| A helper method to build polygon from 4 vertices. More... | |
| virtual Eigen::Vector3f | buildVertex (double i, double j, double k) |
| A helper method to build vertex from x-y-z relatiev coordinates. More... | |
Protected Attributes | |
| std::vector< double > | dimensions_ |
| Eigen::Vector3f | pos_ |
| Eigen::Quaternionf | rot_ |
| jsk_recognition_utils::Cube::Cube | ( | const Eigen::Vector3f & | pos, |
| const Eigen::Quaternionf & | rot | ||
| ) |
| jsk_recognition_utils::Cube::Cube | ( | const Eigen::Vector3f & | pos, |
| const Eigen::Quaternionf & | rot, | ||
| const std::vector< double > & | dimensions | ||
| ) |
| jsk_recognition_utils::Cube::Cube | ( | const Eigen::Vector3f & | pos, |
| const Eigen::Quaternionf & | rot, | ||
| const Eigen::Vector3f & | dimensions | ||
| ) |
| jsk_recognition_utils::Cube::Cube | ( | const jsk_recognition_msgs::BoundingBox & | box | ) |
|
protectedvirtual |
|
protectedvirtual |
| std::vector< Segment::Ptr > jsk_recognition_utils::Cube::edges | ( | ) |
| std::vector< Polygon::Ptr > jsk_recognition_utils::Cube::faces | ( | ) |
returns all the 6 faces as Polygon::Ptr. TODO: is it should be ConvexPolygon?
|
inline |
| ConvexPolygon::Ptr jsk_recognition_utils::Cube::intersectConvexPolygon | ( | Plane & | plane | ) |
|
virtual |
compute minimum distance from point p to cube surface.
Distance computation depends on Polygon::nearestPoint and this methods just searches a face which resutnrs the smallest distance.
|
inline |
| jsk_recognition_msgs::BoundingBox jsk_recognition_utils::Cube::toROSMsg | ( | ) |
| Vertices jsk_recognition_utils::Cube::transformVertices | ( | const Eigen::Affine3f & | pose_offset | ) |
| Vertices jsk_recognition_utils::Cube::vertices | ( | ) |
|
protected |
|
protected |