Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
jsk_recognition_utils::Cube Class Reference

#include <cube.h>

List of all members.

Public Types

typedef boost::shared_ptr< CubePtr

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::Ptredges ()
std::vector< Polygon::Ptrfaces ()
 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_

Detailed Description

Definition at line 45 of file cube.h.


Member Typedef Documentation

typedef boost::shared_ptr<Cube> jsk_recognition_utils::Cube::Ptr

Definition at line 48 of file cube.h.


Constructor & Destructor Documentation

jsk_recognition_utils::Cube::Cube ( const Eigen::Vector3f &  pos,
const Eigen::Quaternionf &  rot 
)

Definition at line 42 of file cube.cpp.

jsk_recognition_utils::Cube::Cube ( const Eigen::Vector3f &  pos,
const Eigen::Quaternionf &  rot,
const std::vector< double > &  dimensions 
)

Definition at line 48 of file cube.cpp.

jsk_recognition_utils::Cube::Cube ( const Eigen::Vector3f &  pos,
const Eigen::Quaternionf &  rot,
const Eigen::Vector3f &  dimensions 
)

Definition at line 54 of file cube.cpp.

jsk_recognition_utils::Cube::Cube ( const Eigen::Vector3f &  pos,
const Line line_a,
const Line line_b,
const Line line_c 
)

Definition at line 64 of file cube.cpp.

Definition at line 106 of file cube.cpp.


Member Function Documentation

Polygon::Ptr jsk_recognition_utils::Cube::buildFace ( const Eigen::Vector3f  v0,
const Eigen::Vector3f  v1,
const Eigen::Vector3f  v2,
const Eigen::Vector3f  v3 
) [protected, virtual]

A helper method to build polygon from 4 vertices.

Definition at line 222 of file cube.cpp.

Eigen::Vector3f jsk_recognition_utils::Cube::buildVertex ( double  i,
double  j,
double  k 
) [protected, virtual]

A helper method to build vertex from x-y-z relatiev coordinates.

Definition at line 263 of file cube.cpp.

Definition at line 111 of file cube.cpp.

returns all the 6 faces as Polygon::Ptr. TODO: is it should be ConvexPolygon?

Definition at line 235 of file cube.cpp.

Definition at line 59 of file cube.h.

Definition at line 162 of file cube.cpp.

Eigen::Vector3f jsk_recognition_utils::Cube::nearestPoint ( const Eigen::Vector3f &  p,
double &  distance 
) [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.

Definition at line 271 of file cube.cpp.

void jsk_recognition_utils::Cube::setDimensions ( const std::vector< double > &  new_dimensions) [inline]

Definition at line 60 of file cube.h.

jsk_recognition_msgs::BoundingBox jsk_recognition_utils::Cube::toROSMsg ( )

Definition at line 191 of file cube.cpp.

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.


Member Data Documentation

Definition at line 96 of file cube.h.

Eigen::Vector3f jsk_recognition_utils::Cube::pos_ [protected]

Definition at line 94 of file cube.h.

Eigen::Quaternionf jsk_recognition_utils::Cube::rot_ [protected]

Definition at line 95 of file cube.h.


The documentation for this class was generated from the following files:


jsk_recognition_utils
Author(s):
autogenerated on Wed Sep 16 2015 04:36:01