Main MRPT website > C++ reference
MRPT logo
Public Member Functions

mpPolygon Class Reference


Detailed Description

An arbitrary polygon, descendant of mpMovableObject.

Use "setPoints" to set the list of N points. This class also can draw non-closed polygons by passing the appropriate parameters to "setPoints". To draw a point-cloud, call "SetContinuity(false)".

Definition at line 1622 of file mathplot.h.

#include <mrpt/otherlibs/mathplot/mathplot.h>

Inheritance diagram for mpPolygon:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mpPolygon (const wxString &layerName=wxT(""))
 Default constructor.
virtual ~mpPolygon ()
void setPoints (const std::vector< double > &points_xs, const std::vector< double > &points_ys, bool closedShape=true)
 Set the points in the polygon.
void setPoints (const std::vector< float > &points_xs, const std::vector< float > &points_ys, bool closedShape=true)
 Set the points in the polygon.

Constructor & Destructor Documentation

mpPolygon::mpPolygon ( const wxString &  layerName = wxT("")) [inline]

Default constructor.

Definition at line 1627 of file mathplot.h.

virtual mpPolygon::~mpPolygon ( ) [inline, virtual]

Definition at line 1633 of file mathplot.h.


Member Function Documentation

void mpPolygon::setPoints ( const std::vector< double > &  points_xs,
const std::vector< double > &  points_ys,
bool  closedShape = true 
)

Set the points in the polygon.

Parameters:
points_xsThe X coordinates of the points.
points_ysThe Y coordinates of the points.
closedShapeIf set to true, an additional segment will be added from the last to the first point.
void mpPolygon::setPoints ( const std::vector< float > &  points_xs,
const std::vector< float > &  points_ys,
bool  closedShape = true 
)

Set the points in the polygon.

Parameters:
points_xsThe X coordinates of the points.
points_ysThe Y coordinates of the points.
closedShapeIf set to true, an additional segment will be added from the last to the first point.



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011