#include <mrpt/math/CPolygon.h>
Public Member Functions | |
CPolygon () | |
Constructor cx and cy are the "central" point coordinates (laser sensor location if applicable) This parameters are NOT used in PointIntoPolygon, so they can be ignored. | |
void | AddVertex (double x, double y) |
Add a new vertex to polygon:. | |
double | GetVertex_x (size_t i) const |
Methods for accessing the vertexs:. | |
double | GetVertex_y (size_t i) const |
size_t | verticesCount () const |
Returns the vertices count in the polygon:. | |
void | setAllVertices (const std::vector< double > &x, const std::vector< double > &y) |
Set all vertices at once. | |
void | setAllVertices (size_t nVertices, const double *xs, const double *ys) |
Set all vertices at once. | |
void | setAllVertices (size_t nVertices, const float *xs, const float *ys) |
Set all vertices at once. | |
void | getAllVertices (std::vector< double > &x, std::vector< double > &y) const |
Get all vertices at once. | |
void | Clear () |
Clear the polygon, erasing all vertexs. | |
bool | PointIntoPolygon (double x, double y) const |
Check if a point is inside the polygon:. |
Definition at line 44 of file CPolygon.h.
mrpt::math::CPolygon::CPolygon | ( | ) | [inline] |
Constructor cx and cy are the "central" point coordinates (laser sensor location if applicable) This parameters are NOT used in PointIntoPolygon, so they can be ignored.
Definition at line 55 of file CPolygon.h.
void mrpt::math::CPolygon::AddVertex | ( | double | x, | |
double | y | |||
) | [inline] |
void mrpt::math::CPolygon::Clear | ( | ) | [inline] |
void mrpt::math::CPolygon::getAllVertices | ( | std::vector< double > & | x, | |
std::vector< double > & | y | |||
) | const |
Get all vertices at once.
double mrpt::math::CPolygon::GetVertex_x | ( | size_t | i | ) | const [inline] |
Methods for accessing the vertexs:.
Definition at line 67 of file CPolygon.h.
References ASSERT_, and mrpt::math::size().
double mrpt::math::CPolygon::GetVertex_y | ( | size_t | i | ) | const [inline] |
bool mrpt::math::CPolygon::PointIntoPolygon | ( | double | x, | |
double | y | |||
) | const [inline] |
Check if a point is inside the polygon:.
Definition at line 88 of file CPolygon.h.
References mrpt::math::TPolygon2D::contains().
void mrpt::math::CPolygon::setAllVertices | ( | size_t | nVertices, | |
const float * | xs, | |||
const float * | ys | |||
) |
Set all vertices at once.
Please use the std::vector version whenever possible unless efficiency is really an issue
void mrpt::math::CPolygon::setAllVertices | ( | size_t | nVertices, | |
const double * | xs, | |||
const double * | ys | |||
) |
Set all vertices at once.
Please use the std::vector version whenever possible unless efficiency is really an issue
void mrpt::math::CPolygon::setAllVertices | ( | const std::vector< double > & | x, | |
const std::vector< double > & | y | |||
) |
Set all vertices at once.
size_t mrpt::math::CPolygon::verticesCount | ( | ) | const [inline] |
Returns the vertices count in the polygon:.
Definition at line 71 of file CPolygon.h.
References mrpt::math::size().
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:02:22 EDT 2009 |