mpPolygon Class Reference

#include <mathplot.h>

Inheritance diagram for mpPolygon:
mpMovableObject mpLayer

List of all members.

Public Member Functions

 mpPolygon (const wxString &layerName=wxT(""))
virtual ~mpPolygon ()
void setPoints (const std::vector< double > &points_xs, const std::vector< double > &points_ys, bool closedShape=true)

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)".


Constructor & Destructor Documentation

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

Default constructor.

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

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_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.

References mpMovableObject::m_shape_xs, mpMovableObject::m_shape_ys, and mpMovableObject::ShapeUpdated().


The documentation for this class was generated from the following files:

© 2003 David Schalig, 2007-2008 Davide Rondini. Generated on Sun Dec 13 12:39:25 2009 for wxMathPlot with Doxygen. Hosted on SourceForge.net Logo