wxEcMath - Official documentation  0.6.4
Public Member Functions | Public Attributes | List of all members
wxEcCurve Class Reference

Defines a curve and its display. More...

#include <ec_plot.h>

Public Member Functions

 wxEcCurve (wxString formulaX=wxEmptyString, wxString formulaY=wxEmptyString, int typeofcurve=wxECT_CARTESIAN, wxColour pencolour=*wxBLUE, int boldness=2, bool usedots=false, bool userange=false, double minrange=-10.0, double maxrange=10.0, unsigned long numpoints=wxECD_RESOLUTION, wxRealPoint *data=NULL)
 
 ~wxEcCurve ()
 
void Validate ()
 
void Parse (wxString def, bool isPolar=false)
 
bool SortCloud ()
 

Public Attributes

bool Defined
 
bool Enabled
 
wxString ExpressionX
 
wxString ExpressionY
 
int Type
 
wxColour Colour
 
int Width
 
bool DotStyle
 
bool RangeEnabled
 
double RangeMin
 
double RangeMax
 
unsigned long NumPoints
 
wxRealPoint * Cloud
 

Detailed Description

Defines a curve and its display.

Constructor & Destructor Documentation

wxEcCurve::wxEcCurve ( wxString  formulaX = wxEmptyString,
wxString  formulaY = wxEmptyString,
int  typeofcurve = wxECT_CARTESIAN,
wxColour  pencolour = *wxBLUE,
int  boldness = 2,
bool  usedots = false,
bool  userange = false,
double  minrange = -10.0,
double  maxrange = 10.0,
unsigned long  numpoints = wxECD_RESOLUTION,
wxRealPoint *  data = NULL 
)
inline

The default constructor. The curve is by default Defined and Enabled.

wxEcCurve::~wxEcCurve ( )
inline

The default destructor.

Member Function Documentation

void wxEcCurve::Parse ( wxString  def,
bool  isPolar = false 
)

Parses a formula and applies the parameters. See the HowTo to know more about.

Parameters
defThe definition.
isPolarIndicates if the input is expected to define a wxECT_POLAR curve.
Remarks
A colour is randomly chosen among a set of colours. You can edit it with wxEcCurve::Colour.
bool wxEcCurve::SortCloud ( )

Sorts the cloud to draw it in the right order. NumPoints is used to determine how many points to sort. The sorting technique used is bubble sort.

Returns
true if the data has been sorted.
void wxEcCurve::Validate ( )

Validates the curve to make it useful without generating unexpected bugs. The call is only required when you define a curve from a user's input that you have not checked beforehand.

Member Data Documentation

wxRealPoint* wxEcCurve::Cloud

Pointer to an array containing the points. Determine the number of points in wxEcCurve::NumPoints.

wxColour wxEcCurve::Colour

The colour used for the display.

bool wxEcCurve::Defined

Marks if a curve should be considerated.

bool wxEcCurve::DotStyle

The Y-coordinate will be a single point. No line is used to link to the previous computed point.

bool wxEcCurve::Enabled

If disabled, the curve won't be displayed.

wxString wxEcCurve::ExpressionX

The expression used for wxECT_CARTESIAN, wxECT_PARAMETRIC and wxECT_POLAR.

wxString wxEcCurve::ExpressionY

The complementary expression needed for wxECT_PARAMETRIC.

unsigned long wxEcCurve::NumPoints

The resolution to draw parametric and polar curves, or the number of points for a point cloud.

bool wxEcCurve::RangeEnabled

This marks the curve to be restricted to a specific domain delimited with RangeMin and RangeMax. If the type of curve is wxECT_PARAMETRIC or wxECT_POLAR, this value shall be true.

double wxEcCurve::RangeMax

The upper limit, for X or T. To be taken into consideration, RangeEnabled must be true.

double wxEcCurve::RangeMin

The lower limit, for X or T. To be taken into consideration, RangeEnabled must be true.

int wxEcCurve::Type

The type of curve.

See also
ec_defs.h (wxECT_*)
int wxEcCurve::Width

Pen's width for the curve.


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



Documentation generated with Doxygen 1.8.10
Hosted on :
Get wxEcMath at SourceForge.net