Main MRPT website > C++ reference
MRPT logo

mpPolygon Class Reference

An arbitrary polygon, descendant of mpMovableObject. More...

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

Inheritance diagram for mpPolygon:
Inheritance graph
[legend]
Collaboration diagram for mpPolygon:
Collaboration 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.

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.


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< float > &  points_xs,
const std::vector< float > &  points_ys,
bool  closedShape = true 
)

Set the points in the polygon.

Parameters:
points_xs The X coordinates of the points.
points_ys The Y coordinates of the points.
closedShape If set to true, an additional segment will be added from the last to the first point.
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_xs The X coordinates of the points.
points_ys The Y coordinates of the points.
closedShape If set to true, an additional segment will be added from the last to the first point.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010