Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef JSK_RECOGNITION_UTILS_GEO_POLYLINE_H_
00037 #define JSK_RECOGNITION_UTILS_GEO_POLYLINE_H_
00038
00039 #include <Eigen/Geometry>
00040 #include <boost/shared_ptr.hpp>
00041 #include "jsk_recognition_utils/types.h"
00042 #include "jsk_recognition_utils/geo/segment.h"
00043 #include "visualization_msgs/Marker.h"
00044
00045 namespace jsk_recognition_utils
00046 {
00051 class PolyLine : public Line
00052 {
00053 public:
00054 typedef boost::shared_ptr<PolyLine> Ptr;
00061 PolyLine(const std::vector < Eigen::Vector3f > &points);
00062
00069 virtual Segment::Ptr at(int index) const;
00070
00075 virtual double distance(const Eigen::Vector3f& point,
00076 Eigen::Vector3f& foot_point) const;
00077 virtual double distance(const Eigen::Vector3f& point) const;
00078
00083 virtual double distanceWithInfo(const Eigen::Vector3f& from,
00084 Eigen::Vector3f& foot_point,
00085 double& distance_to_goal,
00086 int& foot_index,
00087 double& foot_alpha) const;
00088
00095 virtual void getDirection(int index, Eigen::Vector3f& output) const;
00096 virtual Eigen::Vector3f getDirection(int index) const;
00097
00102 virtual double length() const;
00103
00108 virtual PolyLine::Ptr flipPolyLine() const;
00109
00114 void toMarker(visualization_msgs::Marker& marker) const;
00115
00116 friend std::ostream& operator<<(std::ostream& os, const PolyLine& pl);
00117 protected:
00118 std::vector< Segment::Ptr > segments;
00119 };
00120 }
00121
00122 #endif