3D polygon, inheriting from std::vector<TPoint3D>
Definition at line 1142 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>

Public Member Functions | |
| double | distance (const TPoint3D &point) const |
| Distance to point. | |
| bool | contains (const TPoint3D &point) const |
| Check whether a point is inside the polygon. | |
| void | getAsSegmentList (std::vector< TSegment3D > &v) const |
| Gets as set of segments, instead of set of points. | |
| bool | getPlane (TPlane &p) const |
| Gets a plane which contains the polygon. | |
| void | getBestFittingPlane (TPlane &p) const |
| Gets the best fitting plane, disregarding whether the polygon actually fits inside or not. | |
| void | generate2DObject (TPolygon2D &p) const |
| Projects into a 2D space, discarding the z. | |
| void | getCenter (TPoint3D &p) const |
| Get polygon's central point. | |
| bool | isSkew () const |
| Check whether the polygon is skew. | |
| void | removeRepeatedVertices () |
| Remove polygon's repeated vertices. | |
| void | removeRedundantVertices () |
| Erase every redundant vertex, thus saving space. | |
| TPolygon3D () | |
| Default constructor. | |
| TPolygon3D (size_t N) | |
| Constructor for a given size. | |
| TPolygon3D (const std::vector< TPoint3D > &v) | |
| Implicit constructor from a 3D points vector. | |
| TPolygon3D (const TPolygon2D &p) | |
| Constructor from a 2D object. | |
Static Public Member Functions | |
| static void | createRegularPolygon (size_t numEdges, double radius, TPolygon3D &poly) |
| Static method to create a regular polygon, given its size and radius. | |
| static void | createRegularPolygon (size_t numEdges, double radius, TPolygon3D &poly, const mrpt::poses::CPose3D &pose) |
| Static method to create a regular polygon, given its size and radius. | |
| mrpt::math::TPolygon3D::TPolygon3D | ( | ) | [inline] |
Default constructor.
Creates a polygon with no vertices.
Definition at line 1192 of file lightweight_geom_data.h.
| mrpt::math::TPolygon3D::TPolygon3D | ( | size_t | N ) | [inline, explicit] |
Constructor for a given size.
Creates a polygon with a fixed number of vertices, which are initialized to garbage.
Definition at line 1196 of file lightweight_geom_data.h.
| mrpt::math::TPolygon3D::TPolygon3D | ( | const std::vector< TPoint3D > & | v ) | [inline] |
Implicit constructor from a 3D points vector.
Definition at line 1200 of file lightweight_geom_data.h.
| mrpt::math::TPolygon3D::TPolygon3D | ( | const TPolygon2D & | p ) |
Constructor from a 2D object.
Zeroes the z.
| bool mrpt::math::TPolygon3D::contains | ( | const TPoint3D & | point ) | const |
Check whether a point is inside the polygon.
| static void mrpt::math::TPolygon3D::createRegularPolygon | ( | size_t | numEdges, |
| double | radius, | ||
| TPolygon3D & | poly | ||
| ) | [static] |
Static method to create a regular polygon, given its size and radius.
| std::logic_error | if number of edges is less than three, or radius is near zero. |
| static void mrpt::math::TPolygon3D::createRegularPolygon | ( | size_t | numEdges, |
| double | radius, | ||
| TPolygon3D & | poly, | ||
| const mrpt::poses::CPose3D & | pose | ||
| ) | [inline, static] |
Static method to create a regular polygon, given its size and radius.
The center will be located on the given pose.
| std::logic_error | if number of edges is less than three, or radius is near zero. |
| double mrpt::math::TPolygon3D::distance | ( | const TPoint3D & | point ) | const |
Distance to point.
| void mrpt::math::TPolygon3D::generate2DObject | ( | TPolygon2D & | p ) | const [inline] |
Projects into a 2D space, discarding the z.
getPlane,isSkew
Definition at line 1169 of file lightweight_geom_data.h.
| void mrpt::math::TPolygon3D::getAsSegmentList | ( | std::vector< TSegment3D > & | v ) | const |
Gets as set of segments, instead of set of points.
| void mrpt::math::TPolygon3D::getBestFittingPlane | ( | TPlane & | p ) | const |
Gets the best fitting plane, disregarding whether the polygon actually fits inside or not.
| void mrpt::math::TPolygon3D::getCenter | ( | TPoint3D & | p ) | const |
Get polygon's central point.
| bool mrpt::math::TPolygon3D::getPlane | ( | TPlane & | p ) | const |
Gets a plane which contains the polygon.
Returns false if the polygon is skew and cannot be fit inside a plane.
| bool mrpt::math::TPolygon3D::isSkew | ( | ) | const |
Check whether the polygon is skew.
Returns true if there doesn't exist a plane in which the polygon can fit.
| void mrpt::math::TPolygon3D::removeRedundantVertices | ( | ) |
Erase every redundant vertex, thus saving space.
| void mrpt::math::TPolygon3D::removeRepeatedVertices | ( | ) |
Remove polygon's repeated vertices.
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |