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 std::vector< double > &dimensions) |
| Cube (const Eigen::Vector3f &pos, const Eigen::Quaternionf &rot, const Eigen::Vector3f &dimensions) |
| Cube (const Eigen::Vector3f &pos, const Line &line_a, const Line &line_b, const Line &line_c) |
std::vector< Segment::Ptr > | edges () |
std::vector< Polygon::Ptr > | faces () |
| returns all the 6 faces as Polygon::Ptr. TODO: is it should be ConvexPolygon?
|
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.
|
void | setDimensions (const std::vector< double > &new_dimensions) |
jsk_recognition_msgs::BoundingBox | toROSMsg () |
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].
|
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.
|
virtual Eigen::Vector3f | buildVertex (double i, double j, double k) |
| A helper method to build vertex from x-y-z relatiev coordinates.
|
Protected Attributes |
std::vector< double > | dimensions_ |
Eigen::Vector3f | pos_ |
Eigen::Quaternionf | rot_ |
Definition at line 45 of file cube.h.
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].
Definition at line 207 of file cube.cpp.