2D polygon, inheriting from std::vector<TPoint2D>.
- See also
- TPolygon3D,TSegment2D,TLine2D,TPoint2D, CPolygon
Definition at line 952 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
§ TPolygon2D() [1/4]
mrpt::math::TPolygon2D::TPolygon2D |
( |
| ) |
|
|
inline |
§ TPolygon2D() [2/4]
mrpt::math::TPolygon2D::TPolygon2D |
( |
size_t |
N | ) |
|
|
inlineexplicit |
§ TPolygon2D() [3/4]
mrpt::math::TPolygon2D::TPolygon2D |
( |
const std::vector< TPoint2D > & |
v | ) |
|
|
inline |
§ TPolygon2D() [4/4]
mrpt::math::TPolygon2D::TPolygon2D |
( |
const TPolygon3D & |
p | ) |
|
|
explicit |
Constructor from a 3D object.
§ contains()
bool mrpt::math::TPolygon2D::contains |
( |
const TPoint2D & |
point | ) |
const |
§ createRegularPolygon() [1/2]
static void mrpt::math::TPolygon2D::createRegularPolygon |
( |
size_t |
numEdges, |
|
|
double |
radius, |
|
|
TPolygon2D & |
poly |
|
) |
| |
|
static |
Static method to create a regular polygon, given its size and radius.
- Exceptions
-
std::logic_error | if radius is near zero or the number of edges is less than three. |
§ createRegularPolygon() [2/2]
Static method to create a regular polygon from its size and radius.
The center will correspond to the given pose.
- Exceptions
-
std::logic_error | if radius is near zero or the number of edges is less than three. |
§ distance()
double mrpt::math::TPolygon2D::distance |
( |
const TPoint2D & |
point | ) |
const |
§ generate3DObject()
void mrpt::math::TPolygon2D::generate3DObject |
( |
TPolygon3D & |
p | ) |
const |
Projects into 3D space, zeroing the z.
§ getAsSegmentList()
void mrpt::math::TPolygon2D::getAsSegmentList |
( |
std::vector< TSegment2D > & |
v | ) |
const |
Gets as set of segments, instead of points.
§ getCenter()
void mrpt::math::TPolygon2D::getCenter |
( |
TPoint2D & |
p | ) |
const |
§ getPlotData()
void mrpt::math::TPolygon2D::getPlotData |
( |
std::vector< double > & |
x, |
|
|
std::vector< double > & |
y |
|
) |
| const |
§ isConvex()
bool mrpt::math::TPolygon2D::isConvex |
( |
| ) |
const |
Checks whether is convex.
§ removeRedundantVertices()
void mrpt::math::TPolygon2D::removeRedundantVertices |
( |
| ) |
|
§ removeRepeatedVertices()
void mrpt::math::TPolygon2D::removeRepeatedVertices |
( |
| ) |
|
§ elements
T std::vector< T >::elements |
|
inherited |