Public Types | Public Member Functions | Static Public Member Functions | List of all members
jsk_recognition_utils::ConvexPolygon Class Reference

#include <convex_polygon.h>

Inheritance diagram for jsk_recognition_utils::ConvexPolygon:
Inheritance graph
[legend]

Public Types

typedef boost::shared_ptr< ConvexPolygonPtr
 
typedef Eigen::Vector3f Vertex
 
typedef std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > Vertices
 
- Public Types inherited from jsk_recognition_utils::Polygon
typedef boost::shared_ptr< PolygonPtr
 
typedef boost::tuple< Ptr, PtrPtrPair
 
- Public Types inherited from jsk_recognition_utils::Plane
typedef boost::shared_ptr< PlanePtr
 

Public Member Functions

bool allEdgesLongerThan (double thr)
 
 ConvexPolygon (const Vertices &vertices)
 
 ConvexPolygon (const Vertices &vertices, const std::vector< float > &coefficients)
 
double distanceFromVertices (const Eigen::Vector3f &p)
 
bool distanceSmallerThan (const Eigen::Vector3f &p, double distance_threshold)
 
bool distanceSmallerThan (const Eigen::Vector3f &p, double distance_threshold, double &output_distance)
 
virtual ConvexPolygon flipConvex ()
 
virtual Eigen::Vector3f getCentroid ()
 
virtual bool isProjectableInside (const Eigen::Vector3f &p)
 
virtual Ptr magnify (const double scale_factor)
 
virtual Ptr magnifyByDistance (const double distance)
 
virtual void project (const Eigen::Vector3f &p, Eigen::Vector3f &output)
 
virtual void project (const Eigen::Vector3d &p, Eigen::Vector3d &output)
 
virtual void project (const Eigen::Vector3d &p, Eigen::Vector3f &output)
 
virtual void project (const Eigen::Vector3f &p, Eigen::Vector3d &output)
 
virtual void projectOnPlane (const Eigen::Vector3f &p, Eigen::Vector3f &output)
 
virtual void projectOnPlane (const Eigen::Affine3f &p, Eigen::Affine3f &output)
 
geometry_msgs::Polygon toROSMsg ()
 
- Public Member Functions inherited from jsk_recognition_utils::Polygon
virtual double area ()
 
template<class PointT >
void boundariesToPointCloud (pcl::PointCloud< PointT > &output)
 
virtual Eigen::Vector3f centroid ()
 
virtual void clearTriangleDecompositionCache ()
 
virtual std::vector< Polygon::PtrdecomposeToTriangles ()
 
virtual Eigen::Vector3f directionAtPoint (size_t i)
 
double distance (const Eigen::Vector3f &point)
 Compute distance between point and this polygon. More...
 
double distance (const Eigen::Vector3f &point, Eigen::Vector3f &nearest_point)
 Compute distance between point and this polygon. Nearest point on this polygon can be gotten. More...
 
virtual void drawLineToImage (const jsk_recognition_utils::CameraDepthSensor &model, cv::Mat &image, const cv::Scalar &color, const int line_width=1) const
 draw line of polygons on image. More...
 
std::vector< Segment::Ptredges () const
 get all the edges as point of Segment. More...
 
virtual size_t getFarestPointIndex (const Eigen::Vector3f &O)
 
virtual void getLocalMinMax (double &min_x, double &min_y, double &max_x, double &max_y)
 
virtual PointIndexPair getNeighborIndex (size_t index)
 
virtual Eigen::Vector3f getNormalFromVertices ()
 
virtual size_t getNumVertices ()
 
virtual Eigen::Vector3f getVertex (size_t i)
 
virtual Vertices getVertices ()
 
virtual bool isConvex ()
 
virtual bool isInside (const Eigen::Vector3f &p)
 return true if p is inside of polygon. p should be in global coordinates. More...
 
virtual bool isPossibleToRemoveTriangleAtIndex (size_t index, const Eigen::Vector3f &direction)
 
virtual bool isTriangle ()
 
virtual bool maskImage (const jsk_recognition_utils::CameraDepthSensor &model, cv::Mat &image) const
 generate mask image of the polygon. if all the points are outside of field-of-view, returns false. More...
 
virtual Eigen::Vector3f nearestPoint (const Eigen::Vector3f &p, double &distance)
 Compute nearest point from p on this polygon. More...
 
size_t nextIndex (size_t i)
 
 Polygon (const Vertices &vertices)
 
 Polygon (const Vertices &vertices, const std::vector< float > &coefficients)
 
size_t previousIndex (size_t i)
 
Eigen::Vector3f randomSampleLocalPoint (boost::mt19937 &random_generator)
 
template<class PointT >
pcl::PointCloud< PointT >::Ptr samplePoints (double grid_size)
 
virtual PtrPair separatePolygon (size_t index)
 
virtual void transformBy (const Eigen::Affine3d &transform)
 transform Polygon with given transform. cached triangles is cleared. More...
 
virtual void transformBy (const Eigen::Affine3f &transform)
 transform Polygon with given transform. cached triangles is cleared. More...
 
virtual ~Polygon ()
 
- Public Member Functions inherited from jsk_recognition_utils::Plane
virtual double angle (const Plane &another)
 
virtual double angle (const Eigen::Vector3f &vector)
 
virtual Eigen::Affine3f coordinates ()
 
virtual double distance (const Plane &another)
 
virtual double distanceToPoint (const Eigen::Vector4f p)
 
virtual double distanceToPoint (const Eigen::Vector3f p)
 
virtual Plane::Ptr faceToOrigin ()
 
virtual Plane flip ()
 
virtual double getD ()
 
virtual Eigen::Vector3f getNormal ()
 
virtual Eigen::Vector3f getPointOnPlane ()
 
virtual bool isSameDirection (const Plane &another)
 
virtual bool isSameDirection (const Eigen::Vector3f &another_normal)
 
 Plane (const std::vector< float > &coefficients)
 
 Plane (const boost::array< float, 4 > &coefficients)
 
 Plane (Eigen::Vector3f normal, double d)
 
 Plane (Eigen::Vector3f normal, Eigen::Vector3f p)
 
virtual void project (const Eigen::Affine3d &pose, Eigen::Affine3d &output)
 
virtual void project (const Eigen::Affine3f &pose, Eigen::Affine3f &output)
 
virtual double signedDistanceToPoint (const Eigen::Vector4f p)
 
virtual double signedDistanceToPoint (const Eigen::Vector3f p)
 
virtual void toCoefficients (std::vector< float > &output)
 
virtual std::vector< floattoCoefficients ()
 
virtual Plane transform (const Eigen::Affine3d &transform)
 
virtual Plane transform (const Eigen::Affine3f &transform)
 
virtual ~Plane ()
 

Static Public Member Functions

static ConvexPolygon fromROSMsg (const geometry_msgs::Polygon &polygon)
 
static ConvexPolygon::Ptr fromROSMsgPtr (const geometry_msgs::Polygon &polygon)
 
- Static Public Member Functions inherited from jsk_recognition_utils::Polygon
static Polygon createPolygonWithSkip (const Vertices &vertices)
 
static Polygon fromROSMsg (const geometry_msgs::Polygon &polygon)
 
static std::vector< Polygon::PtrfromROSMsg (const jsk_recognition_msgs::PolygonArray &msg, const Eigen::Affine3f &offset=Eigen::Affine3f::Identity())
 convert jsk_recognition_msgs::PolygonArray to std::vector<Polygon::Ptr>. It requires offset transformation in the 2nd argument. More...
 
static Polygon::Ptr fromROSMsgPtr (const geometry_msgs::Polygon &polygon)
 

Additional Inherited Members

- Protected Member Functions inherited from jsk_recognition_utils::Plane
virtual void initializeCoordinates ()
 
- Protected Attributes inherited from jsk_recognition_utils::Polygon
std::vector< Polygon::Ptrcached_triangles_
 
Vertices vertices_
 
- Protected Attributes inherited from jsk_recognition_utils::Plane
double d_
 
Eigen::Vector3f normal_
 
Eigen::Affine3f plane_coordinates_
 

Detailed Description

Definition at line 48 of file convex_polygon.h.

Member Typedef Documentation

Definition at line 51 of file convex_polygon.h.

Definition at line 52 of file convex_polygon.h.

typedef std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > jsk_recognition_utils::ConvexPolygon::Vertices

Definition at line 54 of file convex_polygon.h.

Constructor & Destructor Documentation

jsk_recognition_utils::ConvexPolygon::ConvexPolygon ( const Vertices vertices)

Definition at line 43 of file convex_polygon.cpp.

jsk_recognition_utils::ConvexPolygon::ConvexPolygon ( const Vertices vertices,
const std::vector< float > &  coefficients 
)

Definition at line 49 of file convex_polygon.cpp.

Member Function Documentation

bool jsk_recognition_utils::ConvexPolygon::allEdgesLongerThan ( double  thr)

Definition at line 214 of file convex_polygon.cpp.

double jsk_recognition_utils::ConvexPolygon::distanceFromVertices ( const Eigen::Vector3f &  p)

Definition at line 232 of file convex_polygon.cpp.

bool jsk_recognition_utils::ConvexPolygon::distanceSmallerThan ( const Eigen::Vector3f &  p,
double  distance_threshold 
)

Definition at line 189 of file convex_polygon.cpp.

bool jsk_recognition_utils::ConvexPolygon::distanceSmallerThan ( const Eigen::Vector3f &  p,
double  distance_threshold,
double &  output_distance 
)

Definition at line 196 of file convex_polygon.cpp.

ConvexPolygon jsk_recognition_utils::ConvexPolygon::flipConvex ( )
virtual

Definition at line 95 of file convex_polygon.cpp.

ConvexPolygon jsk_recognition_utils::ConvexPolygon::fromROSMsg ( const geometry_msgs::Polygon &  polygon)
static

Definition at line 165 of file convex_polygon.cpp.

ConvexPolygon::Ptr jsk_recognition_utils::ConvexPolygon::fromROSMsgPtr ( const geometry_msgs::Polygon &  polygon)
static

Definition at line 177 of file convex_polygon.cpp.

Eigen::Vector3f jsk_recognition_utils::ConvexPolygon::getCentroid ( )
virtual

Definition at line 156 of file convex_polygon.cpp.

bool jsk_recognition_utils::ConvexPolygon::isProjectableInside ( const Eigen::Vector3f &  p)
virtual

Definition at line 287 of file convex_polygon.cpp.

ConvexPolygon::Ptr jsk_recognition_utils::ConvexPolygon::magnify ( const double  scale_factor)
virtual

Definition at line 261 of file convex_polygon.cpp.

ConvexPolygon::Ptr jsk_recognition_utils::ConvexPolygon::magnifyByDistance ( const double  distance)
virtual

Definition at line 245 of file convex_polygon.cpp.

void jsk_recognition_utils::ConvexPolygon::project ( const Eigen::Vector3f &  p,
Eigen::Vector3f &  output 
)
virtual

Reimplemented from jsk_recognition_utils::Plane.

Definition at line 109 of file convex_polygon.cpp.

void jsk_recognition_utils::ConvexPolygon::project ( const Eigen::Vector3d &  p,
Eigen::Vector3d &  output 
)
virtual

Reimplemented from jsk_recognition_utils::Plane.

Definition at line 134 of file convex_polygon.cpp.

void jsk_recognition_utils::ConvexPolygon::project ( const Eigen::Vector3d &  p,
Eigen::Vector3f &  output 
)
virtual

Reimplemented from jsk_recognition_utils::Plane.

Definition at line 142 of file convex_polygon.cpp.

void jsk_recognition_utils::ConvexPolygon::project ( const Eigen::Vector3f &  p,
Eigen::Vector3d &  output 
)
virtual

Reimplemented from jsk_recognition_utils::Plane.

Definition at line 148 of file convex_polygon.cpp.

void jsk_recognition_utils::ConvexPolygon::projectOnPlane ( const Eigen::Vector3f &  p,
Eigen::Vector3f &  output 
)
virtual

Definition at line 56 of file convex_polygon.cpp.

void jsk_recognition_utils::ConvexPolygon::projectOnPlane ( const Eigen::Affine3f &  p,
Eigen::Affine3f &  output 
)
virtual

Definition at line 62 of file convex_polygon.cpp.

geometry_msgs::Polygon jsk_recognition_utils::ConvexPolygon::toROSMsg ( )

Definition at line 273 of file convex_polygon.cpp.


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


jsk_recognition_utils
Author(s):
autogenerated on Mon May 3 2021 03:03:03