a2dFunctionCurve Class Reference
[a2dCanvasObject related objectscomplex canvasobject'scomplex canvasobject's for drawing sets of curves]

Object to plot a Curve defined by a Function in form of a string. More...

#include <curve.h>

Inheritance diagram for a2dFunctionCurve:

Inheritance graph
[legend]
Collaboration diagram for a2dFunctionCurve:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dFunctionCurve (const wxString &curve=_T("Not Specified"))
 a2dFunctionCurve (const a2dFunctionCurve &other, CloneOptions options)
virtual a2dObjectClone (CloneOptions options) const
 This is here so that this class cannot be used directly.
void SetXstep (double xstep)
virtual bool GetXyAtSweep (double sweepValue, a2dPoint2D &point) const
 return Points in plot at the value of sweep parameter.

Protected Member Functions

virtual void DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
 write object specific CVGL data
void DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
 load object specific CVG data
a2dBoundingBox DoGetUnTransformedBbox (a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
bool DoUpdate (UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
 Update derived Object specific things ( mainly boundingbox).
void DoRender (a2dIterC &ic, OVERLAP clipparent)
 render derived object
bool DoIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent)
 Does hit test on the object (exclusif child objects).

Protected Attributes

wxString m_curve
double m_xstep
double m_xstart
double m_xstop


Detailed Description

Object to plot a Curve defined by a Function in form of a string.

The Function string will be evaluated for each X to get Y on the Curve

Definition at line 237 of file curve.h.


Member Function Documentation

bool a2dFunctionCurve::GetXyAtSweep ( double  sweepValue,
a2dPoint2D point 
) const [virtual]

return Points in plot at the value of sweep parameter.

In general the sweep parameter is the x value in the plot data, and returned will be the x,y and that x. But in case of complex data x,y = Function( freq ), this here will return the x,y and freq.

Returns:
false when the sweep is outside of range.

Implements a2dCurve.

Definition at line 649 of file curve.cpp.

void a2dFunctionCurve::DoLoad ( wxObject *  parent,
a2dIOHandlerXmlSerIn parser,
a2dXmlSer_flag  xmlparts 
) [protected, virtual]

load object specific CVG data

todo ignore until this down here is fully converted.

Reimplemented from a2dCurve.

Definition at line 794 of file curve.cpp.

bool a2dFunctionCurve::DoUpdate ( UpdateMode  mode,
const a2dBoundingBox childbox,
const a2dBoundingBox clipbox,
const a2dBoundingBox propbox 
) [protected, virtual]

Update derived Object specific things ( mainly boundingbox).

Calculates the boundingbox of the object (exclusif base class child objects but with other nested objects).

Parameters:
mode way to update the objects
childbox size of children boundingbox
clipbox clip to this
propbox size of properties boundingbox
Remarks:
in a derived class this function can also be used to update object specific cache data.

force may or may not have direct influence on the object itself, if this function is called directly for some reason (e.g from derived objects), you must invalidate the boudingbox yourself. GetDrawerBox()->SetValid( false );

Reimplemented from a2dCurveObject.

Definition at line 693 of file curve.cpp.

void a2dFunctionCurve::DoRender ( a2dIterC ic,
OVERLAP  clipparent 
) [protected, virtual]

render derived object

if the object has sub objects (apart from the childobject which are handled here), those subobject most rendered by iterating on layer when needed/wanted, simular to child objects. We do not iterate here, since that is only needed if indeed there or subobjects. This will be know in a "wxDerivedCanvasObject DoRender".

SO parent objects that call this function, must:

  • 1- clip object against area to redraw.
  • 2- iterate on layers when needed.
A a2dCanvasObject is rendered as a + (plus sign) when there or no children.

Reimplemented from a2dCanvasObject.

Definition at line 721 of file curve.cpp.

bool a2dFunctionCurve::DoIsHitWorld ( a2dIterC ic,
a2dHitEvent hitEvent 
) [protected, virtual]

Does hit test on the object (exclusif child objects).

DoIsHitWorld() should return the way the object is hit by filling a2dHitEvent::m_how with the correct info.

Parameters:
ic iterative context ( e.g. current transform WITH the local transform applied )
hitEvent stores hit information
Returns:
true if hit

Reimplemented from a2dCanvasObject.

Definition at line 758 of file curve.cpp.


The documentation for this class was generated from the following files:
a2dFunctionCurve Class Reference -- Tue Aug 31 18:27:39 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation