pGraphicalFunction Class Reference

#include <pGraphicalFunction.h>

Inheritance diagram for pGraphicalFunction:

Inheritance graph
[legend]
Collaboration diagram for pGraphicalFunction:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 pGraphicalFunction (wxString name=wxEmptyString, int flags=0x00)
 ~pGraphicalFunction ()
virtual int getXTraslation ()
virtual int getmType ()
virtual int vGetType ()
virtual void getOffsets (int &offsetX, int &offSetY)
virtual void getFactorZoom (float &fz)
virtual void getFromWindowV (bool &fw)
virtual void getIfActual (bool &actual)
virtual void getMax (int &maxX, int &maxY)
virtual void getMaxShowed (int &maxX, int &maxY)
virtual void getMinShowed (int &minX, int &minY)
virtual void getScreens (int &scrX, int &scrY)
virtual void setScreens (int scrX, int scrY)
virtual void getScales (double &scaleX, double &scaleY)
virtual void getDrawing (bool &draw)
virtual void ifShowPoints (bool &show)
virtual void Rewind ()
virtual bool GetNextXY (double &x, double &y)
virtual void GetPoints (wxList &points)
virtual void getMousePoint (int &x, int &y)
virtual void getSize (int &size)
virtual void getDirection (bool &dir)
int validPointOnFunction (wxPoint realPoint)
int getIndexOf (wxPoint realpoint)
wxNode * GetPointAt (int movingPointIndex)
bool AddNewPoint (int x, int y)
bool AddPoint (int aX, int aY, bool order=true)
bool DeletePoint (int aX, int aY)
bool changePoint (wxPoint newCoords, int movingIndexPoint)
double * getX_RealValues ()
double * getY_RealValues ()
bool orderPoints ()
bool deletePointAt (int index)
int getSizePoints ()
void setScales ()
bool isInFunction (int x, int y)
wxNode * getBefore (pFunctionPoint *point)
bool isInLine (pFunctionPoint *before, pFunctionPoint *next, pFunctionPoint *point)
double interpolateY (double m, int x1, int y1, int x)
void setUp ()
void clearSplineVectors ()
void initializeSplines ()
void addSplinesPoints ()
void initializeSplineVectors ()
void GetSplinePoint (double t, double &x, double &y)
virtual std::vector
< double > 
getXSpline ()
virtual std::vector
< double > 
getYSpline ()
virtual int getOffsetPixelsXv ()
virtual int getOffsetPixelsYv ()
void save (wxString fileName)
void load (wxString fileName)
void SetShowPoints (bool showPoints)
bool getShowPoints ()
void setScreenX (int scrX)
int getScreenX ()
void setScreenY (int scrY)
int getScreenY ()
void setStartX (double aStartX)
double getStartX ()
void setStartY (double aStartY)
double getStartY ()
void setEndX (double aEndX)
double getEndX ()
void setEndY (double aEndY)
double getEndY ()
void setScaleX (double aScaleX)
double getScaleX ()
void setScaleY (double aScaleY)
double getScaleY ()
void setMinX (double aMinX)
double getMinX ()
void setMinY (double aMinY)
double getMinY ()
void setMaxX (double aMaxX)
double getMaxX ()
void setMaxY (double aMaxY)
double getMaxY ()
void setOffsetX (double aOffsetX)
double getOffsetX ()
void setOffsetY (double aOffsetY)
double getOffsetY ()
void setType (int aType)
int getType ()
int getValidPointRange ()
void setValidPointRange (int theRange)
void SetDrawing (bool d)
bool GetDrawing ()
void SetMousePoint (wxPoint p)
wxPoint getMousePoint ()
void setActual (bool act)
bool getActual ()
void setScaleWay (int typeS)
int getScaleWay ()
void setFromWindow (bool w)
bool getFromWindow ()
void setFactorZoom (float factor)
void setEditable (bool edit)
bool getEditable ()
bool getZoomB ()
void setZoomIn (bool z)
void setInitialDrawPoint (pFunctionPoint *initialPoint)
pFunctionPointgetInitialDrawPoint ()
void setFinalDrawPoint (pFunctionPoint *finalPoint)
pFunctionPointgetFinallDrawPoint ()
void zooming (int clickedX, int clickedY, int width)
void setOffsets (int offx, int offy)
void setMinShowed ()
int getMinXShowed ()
int getMinYShowed ()
int getMaxXShowed ()
int getMaxYShowed ()
void setMinShowedX (int msx)
void setMinShowedY (int msy)
void setMaxShowedX (int msx)
void setMaxShowedY (int msy)
int getOffsetPixelsX ()
int getOffsetPixelsY ()
void setOffsetPixelX (int offX)
void setOffsetPixelY (int offY)
void setColorPoints (std::vector< pColorPoint * > &colorVector)
void getColorPoints (std::vector< pColorPoint * > &colorVector)
void setmType (int mt)
void setXTraslation (int xT)
bool initializePolygon (wxPoint *points, double x1, double y1, double x2, double y2)
void draw (wxDC &dc, mpWindow &w, double x1, double y1, double x2, double y2, int orgy)
void drawSplineCurve (wxDC &dc, mpWindow &w, int orgy)
void drawLineToMousePoint (wxDC &dc, mpWindow &w, int orgy)
void drawFunction (wxDC &dc, mpWindow &w, int orgy)
void drawPoints (wxDC &dc, mpWindow &w, int orgy)
virtual void Plot (wxDC &dc, mpWindow &w)
virtual bool HasBBox ()
virtual double GetMinX ()
virtual double GetMaxX ()
virtual double GetMinY ()
virtual double GetMaxY ()
wxString GetName () const
const wxFont & GetFont () const
const wxPen & GetPen () const
void SetName (wxString name)
void SetFont (wxFont &font)
void SetPen (wxPen &pen)
int GetYTranslated (double sizey, double y)

Protected Attributes

int m_flags
 Holds label alignment.
wxList points
double scaleX
double scaleY
int offsetX
int offsetY
wxFont m_font
 Layer's font.
wxPen m_pen
 Layer's pen.
wxString m_name
 Layer's name.

Private Attributes

pLogicalFunctionlogicFunction
bool showPointsF
double _startX
double _startY
double _endX
double _endY
double _scaleX
double _scaleY
double _minX
double _minY
double _maxX
double _maxY
double _offsetX
double _offsetY
int _type
wxList realPoints
std::vector
< pColorPoint * > 
f_colorPoints
wxNode * node
int validPointRange
bool drawing
wxPoint mousePoint
int screenX
int screenY
bool ifActual
int scaleWay
bool fromWindow
float factorZoom
bool editable
bool zoomIn
pFunctionPointinitialDrawingPoint
pFunctionPointfinalDrawingPoint
int minShowedX
int maxShowedX
int minShowedY
int maxShowedY
std::vector< double > xSpline
std::vector< double > ySpline
vtkKochanekSpline * xKSpline
vtkKochanekSpline * yKSpline
int offsetPixelX
int offsetPixelY
int mType
int xTraslation


Detailed Description

Definition at line 68 of file pGraphicalFunction.h.


Constructor & Destructor Documentation

pGraphicalFunction::pGraphicalFunction ( wxString  name = wxEmptyString,
int  flags = 0x00 
)

Definition at line 27 of file pGraphicalFunction.cxx.

References DEFAULT.

00028 {
00029         SetName(name);
00030         showPointsF = false;
00031         validPointRange = 5;
00032         logicFunction = new pLogicalFunction ();
00033         fromWindow=false;
00034         factorZoom=1;
00035         drawing=false;
00036         editable=true;
00037         ifActual=false;
00038         zoomIn=false;
00039         setOffsetX(0);
00040         setOffsetY(0);
00041         initialDrawingPoint=NULL;
00042         finalDrawingPoint=NULL;
00043         //type=1 means that is going to be a piecewise function
00044         _type=1;
00045         xKSpline=NULL;
00046         yKSpline=NULL;
00047         offsetPixelX=0;
00048         offsetPixelY=0;
00049         xTraslation=0;
00050         mType=DEFAULT;
00051 }

pGraphicalFunction::~pGraphicalFunction (  ) 

Is the destructor!!!

Definition at line 56 of file pGraphicalFunction.cxx.

00057 {
00058         
00059 }


Member Function Documentation

virtual int pGraphicalFunction::getXTraslation (  )  [inline, virtual]

Get the value of the traslation in the x-axis

Reimplemented from pPlotterLayer.

Definition at line 85 of file pGraphicalFunction.h.

References xTraslation.

00086         {
00087                 return xTraslation;
00088         }

virtual int pGraphicalFunction::getmType (  )  [inline, virtual]

Get the type of the curve 1=normal function 2=Histogram

Reimplemented from pPlotterLayer.

Definition at line 98 of file pGraphicalFunction.h.

References mType.

00099         {
00100                 return mType;
00101         }

virtual int pGraphicalFunction::vGetType (  )  [inline, virtual]

Get the type of the curve 1=piecewise functio 2= smooth

Reimplemented from pPlotterLayer.

Definition at line 108 of file pGraphicalFunction.h.

References _type.

00109         {
00110                 return _type;
00111         }

virtual void pGraphicalFunction::getOffsets ( int &  offsetX,
int &  offSetY 
) [inline, virtual]

Get _offsetX and _offsetY

Reimplemented from pPlotterLayer.

Definition at line 117 of file pGraphicalFunction.h.

References _offsetX, _offsetY, and pPlotterLayer::offsetY.

00118         {
00119                 offsetX=(int)_offsetX;
00120                 offsetY=(int)_offsetY;
00121         }

virtual void pGraphicalFunction::getFactorZoom ( float &  fz  )  [inline, virtual]

Reimplemented from pPlotterLayer.

Definition at line 126 of file pGraphicalFunction.h.

References factorZoom.

00127         {
00128                 fz=factorZoom;
00129         }

virtual void pGraphicalFunction::getFromWindowV ( bool &  fw  )  [inline, virtual]

Definition at line 135 of file pGraphicalFunction.h.

References fromWindow.

00136         {
00137                 fw=fromWindow;
00138         }

virtual void pGraphicalFunction::getIfActual ( bool &  actual  )  [inline, virtual]

if the function that is drawing is the actual

Reimplemented from pPlotterLayer.

Definition at line 144 of file pGraphicalFunction.h.

References ifActual.

00145         {
00146                 actual=ifActual;
00147         }

virtual void pGraphicalFunction::getMax ( int &  maxX,
int &  maxY 
) [inline, virtual]

get the max of the function in x and y

Reimplemented from pPlotterLayer.

Definition at line 152 of file pGraphicalFunction.h.

References getMaxX(), and getMaxY().

00153         {
00154                 maxX=(int)getMaxX();
00155             maxY=(int)getMaxY();
00156         }

Here is the call graph for this function:

virtual void pGraphicalFunction::getMaxShowed ( int &  maxX,
int &  maxY 
) [inline, virtual]

get the maxShowed of the function in x and y

Reimplemented from pPlotterLayer.

Definition at line 160 of file pGraphicalFunction.h.

References getMaxXShowed(), and getMaxYShowed().

00161         {
00162                 maxX=(int)getMaxXShowed();
00163                 maxY=(int)getMaxYShowed();
00164         }

Here is the call graph for this function:

virtual void pGraphicalFunction::getMinShowed ( int &  minX,
int &  minY 
) [inline, virtual]

get the minShowed of the function in x and y

Reimplemented from pPlotterLayer.

Definition at line 168 of file pGraphicalFunction.h.

References getMinXShowed(), and getMinYShowed().

00169         {
00170                 minX=(int)getMinXShowed();
00171                 minY=(int)getMinYShowed();
00172         }

Here is the call graph for this function:

virtual void pGraphicalFunction::getScreens ( int &  scrX,
int &  scrY 
) [inline, virtual]

Get screens of the function

Reimplemented from pPlotterLayer.

Definition at line 177 of file pGraphicalFunction.h.

References screenX, and screenY.

00178         {
00179       scrX=screenX;
00180           scrY=screenY;
00181         }

virtual void pGraphicalFunction::setScreens ( int  scrX,
int  scrY 
) [inline, virtual]

Set screens value

Reimplemented from pPlotterLayer.

Definition at line 186 of file pGraphicalFunction.h.

References screenX, and screenY.

Referenced by HistogramWidget::OnSize(), and pPlotterWindow::setActualScales().

00187         {
00188                 screenX=scrX;
00189                 screenY=scrY;                   
00190         }

Here is the caller graph for this function:

virtual void pGraphicalFunction::getScales ( double &  scaleX,
double &  scaleY 
) [inline, virtual]

Let us know the scale of the function

Reimplemented from pPlotterLayer.

Definition at line 195 of file pGraphicalFunction.h.

References _scaleX, and _scaleY.

00196         {
00197                 scaleX=_scaleX;
00198                 scaleY=_scaleY;
00199         }

virtual void pGraphicalFunction::getDrawing ( bool &  draw  )  [inline, virtual]

Let us Know if the user has finished the drawing that starts before.

Reimplemented from pPlotterLayer.

Definition at line 207 of file pGraphicalFunction.h.

References drawing.

00208         {
00209                 draw = drawing;
00210         }

virtual void pGraphicalFunction::ifShowPoints ( bool &  show  )  [inline, virtual]

Let us Know if the user want to see the points of the function of other color than the color of the lines

Reimplemented from pPlotterLayer.

Definition at line 216 of file pGraphicalFunction.h.

References showPointsF.

00217         {
00218                 show = showPointsF;
00219         }

virtual void pGraphicalFunction::Rewind (  )  [inline, virtual]

Rewind

Reimplemented from pPlotterLayer.

Definition at line 224 of file pGraphicalFunction.h.

References pLogicalFunction::GetPointAt(), logicFunction, and node.

00225         {
00226                                 
00227                 node = logicFunction->GetPointAt(0);
00228                 
00229         }

Here is the call graph for this function:

virtual bool pGraphicalFunction::GetNextXY ( double &  x,
double &  y 
) [inline, virtual]

Get locus value for next N. Override this function in your implementation.

Parameters:
x Returns X value
y Returns Y value

Reimplemented from pPlotterLayer.

Definition at line 236 of file pGraphicalFunction.h.

References pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), and node.

00237         {
00238                 if(node)
00239                 {
00240                         pFunctionPoint* p=(pFunctionPoint*)node->GetData();
00241                         x=p->getRealX();
00242                         y=p->getRealY();
00243                         node=node->GetNext();
00244                         return true;
00245                 }
00246                 return false;
00247         }

Here is the call graph for this function:

virtual void pGraphicalFunction::GetPoints ( wxList &  points  )  [inline, virtual]

Get Point list of the funcion

Parameters:
return points

Reimplemented from pPlotterLayer.

Definition at line 252 of file pGraphicalFunction.h.

References pLogicalFunction::GetPoints(), and logicFunction.

00253         {
00254                 logicFunction->GetPoints(points);
00255                 //points = realPoints;
00256         }  

Here is the call graph for this function:

virtual void pGraphicalFunction::getMousePoint ( int &  x,
int &  y 
) [inline, virtual]

Get the point where the user made a click

Reimplemented from pPlotterLayer.

Definition at line 263 of file pGraphicalFunction.h.

References mousePoint.

00264         {
00265                 x=mousePoint.x;
00266                 y=mousePoint.y;
00267         }

virtual void pGraphicalFunction::getSize ( int &  size  )  [inline, virtual]

Get the number of points of the function

Reimplemented from pPlotterLayer.

Definition at line 272 of file pGraphicalFunction.h.

References getSizePoints().

00273         {
00274                 size=getSizePoints();
00275         }

Here is the call graph for this function:

virtual void pGraphicalFunction::getDirection ( bool &  dir  )  [inline, virtual]

this method gets the direction of the drawing

Reimplemented from pPlotterLayer.

Definition at line 280 of file pGraphicalFunction.h.

References logicFunction.

00281         {               
00282                 logicFunction -> getDirection (dir);
00283         }

int pGraphicalFunction::validPointOnFunction ( wxPoint  realPoint  ) 

Definition at line 92 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by pPlotterWindow::onAddPoint(), pPlotterWindow::onDeletePoint(), and pPlotterWindow::onMouseMove().

00093 {
00094         return (logicFunction -> validPointOnFunction (realPoint));
00095 }

Here is the caller graph for this function:

int pGraphicalFunction::getIndexOf ( wxPoint  realpoint  ) 

Definition at line 99 of file pGraphicalFunction.cxx.

References logicFunction.

00100 {
00101         return logicFunction -> getIndexOf( realpoint );        
00102 }

wxNode * pGraphicalFunction::GetPointAt ( int  movingPointIndex  ) 

Definition at line 109 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by HistogramWidget::getTransferenceFunctionPoint(), and pPlotterWindow::onMouseMove().

00110 {
00111         return logicFunction -> GetPointAt ( movingPointIndex );        
00112 }

Here is the caller graph for this function:

bool pGraphicalFunction::AddNewPoint ( int  x,
int  y 
)

Definition at line 140 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by pPlotterWindow::onAddNewPoint(), and pPlotterWindow::onAddPoint().

00141 {
00142         bool added= logicFunction -> AddNewPoint ( x, y );
00143         if(!fromWindow)
00144          setUp();
00145         else
00146         {
00147                 logicFunction->setEndPoints();
00148                 logicFunction->setStartPoints();
00149         }
00150         return added;
00151 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::AddPoint ( int  aX,
int  aY,
bool  order = true 
)

this method add a new logical point to the function, this point is one of those used to draw the function

Definition at line 160 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by HistogramWidget::addPointToTransferenceFunction(), and pPlotterWindow::onAddPoint().

00161 {       
00162         bool added=false;
00163         if (logicFunction!=NULL){
00164                 added=logicFunction -> AddPoint( aX, aY,order );
00165                 if(!fromWindow)
00166                         setUp();
00167                 else
00168                 {
00169                         logicFunction->setEndPoints();
00170                         logicFunction->setStartPoints();
00171                 } // if fromWindow
00172         } // if logicFunction
00173         return added;
00174 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::DeletePoint ( int  aX,
int  aY 
)

deletes the point given by the user from the collection of logical points of the function

deletes the point given by the user from the collection of logical points of the function is not used

Definition at line 181 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by pPlotterWindow::DeletePointFunction().

00182 {
00183         bool added= logicFunction -> DeletePoint( aX, aY );     
00184         if(!fromWindow)
00185          setUp();
00186         else
00187         {
00188                 logicFunction->setEndPoints();
00189                 logicFunction->setStartPoints();
00190         }
00191         return added;
00192 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::changePoint ( wxPoint  newCoords,
int  movingIndexPoint 
)

Change de coordinates of the given point if it is possible and return the result of the invoked action. True if it was possible to do the change.

Change de coordinates of the given index point to the newCoords, if it is possible and return the result of the invoked action. Return TRUE if it was possible to do the change. A valid change is when the new x value of the point is still between the previous and next point, when condition.

Definition at line 214 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by pPlotterWindow::onMouseMove().

00215 {
00216         bool added= (logicFunction -> changePoint( newCoords, movingIndexPoint ));
00217         if(!fromWindow)
00218          setUp();
00219         else
00220         {
00221                 logicFunction->setEndPoints();
00222                 logicFunction->setStartPoints();
00223         }
00224         return added;
00225 }

Here is the call graph for this function:

Here is the caller graph for this function:

double * pGraphicalFunction::getX_RealValues (  ) 

Evaluates if the given point belongs to the function. Returns the real x values of the control points of the function. It dont includes the points calculated by interpolation.

Definition at line 239 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by pPlotter::GetValuesPointsFunction().

00240 {
00241         return (logicFunction -> getX_RealValues( ));   
00242 }

Here is the caller graph for this function:

double * pGraphicalFunction::getY_RealValues (  ) 

Returns the real y values of the control points of the function. It dont includes the points calculated by interpolation.

Definition at line 247 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by pPlotter::GetValuesPointsFunction().

00248 {  
00249 
00250         return (logicFunction -> getY_RealValues());    
00251 }

Here is the caller graph for this function:

bool pGraphicalFunction::orderPoints (  ) 

bool pGraphicalFunction::deletePointAt ( int  index  ) 

This method get a pointer to the node in the real points list that is inmediately previous to the searched by parameter.

Precondition:
The seached point (realX, realY) is not the first point of the list.
Parameters:
realX 
realY Deletes a point of the function given its index
deletes a point of the functio given its index

Definition at line 197 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by HistogramWidget::erasePointsTransferenceFunction(), and pPlotterWindow::onDeletePoint().

00198 {
00199         bool added=logicFunction -> deletePointAt( index );
00200         if(!fromWindow)
00201          setUp();
00202         else
00203         {
00204                 logicFunction->setEndPoints();
00205                 logicFunction->setStartPoints();
00206         }
00207         return added;
00208 }

Here is the call graph for this function:

Here is the caller graph for this function:

int pGraphicalFunction::getSizePoints (  ) 

Definition at line 815 of file pGraphicalFunction.cxx.

References pLogicalFunction::getSizePoints(), and logicFunction.

Referenced by HistogramWidget::erasePointsTransferenceFunction(), getSize(), HistogramWidget::getSizeTransferenceFunction(), pPlotter::GetValuesPointsFunction(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), pPlotterWindow::onStopDrawing(), and zooming().

00816 {
00817         return logicFunction->getSizePoints();
00818 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setScales (  ) 

Definition at line 117 of file pGraphicalFunction.cxx.

References factorZoom, logicFunction, maxShowedX, maxShowedY, minShowedX, minShowedY, pPlotterLayer::scaleX, pPlotterLayer::scaleY, screenX, screenY, pLogicalFunction::setScaleX(), setScaleX(), pLogicalFunction::setScaleY(), and setScaleY().

Referenced by HistogramWidget::OnSize(), pPlotterWindow::setActualScales(), setOffsets(), and zooming().

00118 {
00119         //int dx= logicFunction->getMaxX()-logicFunction->getMinX();
00120         //int dy= logicFunction->getMaxY()-logicFunction->getMinY();
00121         int dx= maxShowedX-minShowedX;
00122         int dy= maxShowedY-minShowedY;
00123         
00124         
00125         if(dx!=0 && dy!=0)
00126         {
00127                 double scaleX=(((float)(screenX-100))/dx)*factorZoom;
00128                 double scaleY=(((float)(screenY-50))/dy)*factorZoom;
00129                 setScaleX(scaleX);
00130                 setScaleY(scaleY);
00131                 logicFunction->setScaleX(scaleX);
00132                 logicFunction->setScaleY(scaleY);
00133 
00134         }
00135 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::isInFunction ( int  x,
int  y 
)

Definition at line 261 of file pGraphicalFunction.cxx.

References getBefore(), and isInLine().

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onMouseMove().

00262 {
00263         wxNode* before;
00264         wxNode* next;
00265         pFunctionPoint* point= new pFunctionPoint(x,y);
00266         bool inLine;
00267         before=getBefore(point);
00268 
00269         if(before && before->GetNext())
00270         {
00271                 next = before->GetNext();
00272                 //next = (before->GetNext())->GetNext();
00273                 inLine= isInLine((pFunctionPoint*)before->GetData(),(pFunctionPoint*)next->GetData(),point);
00274         }
00275         else 
00276                 inLine=false;
00277         return inLine;
00278 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxNode * pGraphicalFunction::getBefore ( pFunctionPoint point  ) 

Definition at line 283 of file pGraphicalFunction.cxx.

References pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), logicFunction, and node.

Referenced by isInFunction().

00284 {
00285         int minDiference=10000000;
00286         wxNode* node=logicFunction->GetPointAt(0);
00287         wxNode* before=NULL;
00288 
00289         while(node)
00290         {
00291                 pFunctionPoint* before1=(pFunctionPoint*)node->GetData();
00292                 int beforeX=before1->getRealX();
00293                 int pointX=point->getRealX();
00294                 if(beforeX<pointX)
00295                 {
00296                   int minDiference1=pointX-beforeX;
00297                   if(minDiference1<minDiference)
00298                   {
00299                           minDiference=minDiference1;
00300                           before=node;
00301                   }
00302                 }
00303                 node=node->GetNext();
00304         }
00305         return before;
00306 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::isInLine ( pFunctionPoint before,
pFunctionPoint next,
pFunctionPoint point 
)

Definition at line 310 of file pGraphicalFunction.cxx.

References pFunctionPoint::getRealX(), and pFunctionPoint::getRealY().

Referenced by isInFunction().

00311 {
00312         int x1,x2,x,y1,y2,y;
00313         
00314         x1=(float)before->getRealX();
00315         x2=(float)next->getRealX();
00316         y1=(float)before->getRealY();
00317         y2=(float)next->getRealY();
00318         x=(float)point->getRealX();
00319         y=(float)point->getRealY();
00320 
00321         
00322         float d1= (float)sqrt(pow(float(x1-x),2)+ pow(float(y1-y),2));
00323         float d2= (float)sqrt(pow(float(x2-x),2)+ pow(float(y2-y),2));
00324         float d=(float)sqrt(pow(float(x2-x1),2)+ pow(float(y2-y1),2));
00325         if(d1+d2<=(d*1.1) && d1<=d && d2<=d)
00326                 return true;
00327         return false;
00328 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::interpolateY ( double  m,
int  x1,
int  y1,
int  x 
)

give us the value of y in the line define by the arguments

Definition at line 332 of file pGraphicalFunction.cxx.

00333 {
00334         return m*(x-x1)+y1;
00335 }

void pGraphicalFunction::setUp (  ) 

Definition at line 74 of file pGraphicalFunction.cxx.

References pLogicalFunction::getEndX(), pLogicalFunction::getEndY(), pLogicalFunction::getMaxX(), pLogicalFunction::getMaxY(), pLogicalFunction::getMinX(), pLogicalFunction::getMinY(), pLogicalFunction::getStartX(), pLogicalFunction::getStartY(), logicFunction, setEndX(), setEndY(), setMaxX(), setMaxY(), setMinX(), setMinY(), setStartX(), setStartY(), and pLogicalFunction::setUp().

Referenced by AddNewPoint(), AddPoint(), changePoint(), DeletePoint(), and deletePointAt().

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::clearSplineVectors (  ) 

Definition at line 349 of file pGraphicalFunction.cxx.

References xSpline, and ySpline.

Referenced by pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onLine(), pPlotterWindow::onMouseMove(), and pPlotter::update().

00350         {
00351                 xSpline.clear();
00352                 ySpline.clear();
00353         }

Here is the caller graph for this function:

void pGraphicalFunction::initializeSplines (  ) 

Definition at line 358 of file pGraphicalFunction.cxx.

References addSplinesPoints(), xKSpline, and yKSpline.

Referenced by pPlotterWindow::addFunction(), and pPlotterWindow::onSplinePoints().

00359         {
00360                 if(xKSpline==NULL)
00361                         xKSpline = vtkKochanekSpline::New();
00362                 if(yKSpline==NULL)
00363                         yKSpline= vtkKochanekSpline::New();
00364                 addSplinesPoints();
00365 
00366         }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::addSplinesPoints (  ) 

Definition at line 372 of file pGraphicalFunction.cxx.

References pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), logicFunction, node, xKSpline, and yKSpline.

Referenced by initializeSplines(), pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), and pPlotter::update().

00373         {
00374                 xKSpline->RemoveAllPoints();
00375                 yKSpline->RemoveAllPoints();
00376                 wxNode *node= logicFunction->GetPointAt(0);
00377                 pFunctionPoint* p;
00378                 int i=0;
00379                 while(node)
00380                 {
00381                         p=(pFunctionPoint*)node->GetData();
00382                         xKSpline->AddPoint(i,p->getRealX());
00383                         yKSpline->AddPoint(i,p->getRealY());
00384                         i++;
00385                         node=node->GetNext();
00386                 }
00387         }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::initializeSplineVectors (  ) 

Definition at line 392 of file pGraphicalFunction.cxx.

References pLogicalFunction::getSizePoints(), GetSplinePoint(), logicFunction, xSpline, and ySpline.

Referenced by pPlotterWindow::addFunction(), pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), pPlotterWindow::onSplinePoints(), and pPlotter::update().

00393         {
00394                 double x=0,y=0,t,delta;
00395                 int i,np,nps;
00396                 //realPoints.DeleteC  
00397 
00398                 np = logicFunction->getSizePoints();
00399                 nps = 200;
00400                 delta=( double ) ( np ) / ( double ) ( nps );
00401                 for( i = 0; i < nps; i++ )
00402                 {
00403                   t = delta * (double)i;
00404                   GetSplinePoint(t,x,y);
00405                   xSpline.push_back(x);
00406                   ySpline.push_back(y);
00407                 }
00408         }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::GetSplinePoint ( double  t,
double &  x,
double &  y 
)

Definition at line 412 of file pGraphicalFunction.cxx.

References pLogicalFunction::getSizePoints(), logicFunction, xKSpline, and yKSpline.

Referenced by initializeSplineVectors().

00413         {
00414                 if (logicFunction->getSizePoints()==0)
00415                 {
00416                         x = 0;
00417                         y = 0;
00418                 }
00419                 if (logicFunction->getSizePoints()>=2)
00420                 {
00421                         x = xKSpline->Evaluate(t);
00422                         y = yKSpline->Evaluate(t);
00423                 }
00424         }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::vector<double> pGraphicalFunction::getXSpline (  )  [inline, virtual]

Reimplemented from pPlotterLayer.

Definition at line 426 of file pGraphicalFunction.h.

References xSpline.

00427         {
00428                 return xSpline;
00429         }

virtual std::vector<double> pGraphicalFunction::getYSpline (  )  [inline, virtual]

Reimplemented from pPlotterLayer.

Definition at line 433 of file pGraphicalFunction.h.

References ySpline.

00434         {
00435                 return ySpline;
00436         }

virtual int pGraphicalFunction::getOffsetPixelsXv (  )  [inline, virtual]

Gets the x-offset of the zoom in pixels

Reimplemented from pPlotterLayer.

Definition at line 443 of file pGraphicalFunction.h.

References offsetPixelX.

00444         {
00445                 return offsetPixelX;
00446         }       

virtual int pGraphicalFunction::getOffsetPixelsYv (  )  [inline, virtual]

Gets the offset of the zoom in pixels

Reimplemented from pPlotterLayer.

Definition at line 452 of file pGraphicalFunction.h.

References offsetPixelY.

00453         {
00454                 return offsetPixelY;
00455         }

void pGraphicalFunction::save ( wxString  fileName  ) 

Definition at line 575 of file pGraphicalFunction.cxx.

References logicFunction, and pLogicalFunction::save().

Referenced by pPlotterWindow::onSave().

00576 {
00577         
00578         logicFunction->save(fileName);
00579 
00580 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::load ( wxString  fileName  ) 

Definition at line 584 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMaxX(), pLogicalFunction::getMaxY(), pLogicalFunction::getMinX(), pLogicalFunction::getMinY(), pLogicalFunction::load(), logicFunction, setMaxShowedX(), setMaxShowedY(), setMinShowedX(), setMinShowedY(), and pLogicalFunction::setUp().

Referenced by pPlotterWindow::onLoad().

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::SetShowPoints ( bool  showPoints  ) 

Definition at line 62 of file pGraphicalFunction.cxx.

References showPointsF.

Referenced by HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onNoShowPoints(), pPlotterWindow::onShowPoints(), and pPlotterWindow::onStartDrawing().

00063 {
00064         showPointsF = showPoints;
00065 }

Here is the caller graph for this function:

bool pGraphicalFunction::getShowPoints (  ) 

Definition at line 67 of file pGraphicalFunction.cxx.

References showPointsF.

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onStartDrawing().

00068 {
00069         return showPointsF;
00070 }

Here is the caller graph for this function:

void pGraphicalFunction::setScreenX ( int  scrX  ) 

Definition at line 628 of file pGraphicalFunction.cxx.

References screenX.

Referenced by pPlotterWindow::onMouseMove(), pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00629 {
00630   this->screenX=scrX;
00631 }

Here is the caller graph for this function:

int pGraphicalFunction::getScreenX (  ) 

Definition at line 632 of file pGraphicalFunction.cxx.

References screenX.

00633 {
00634   return this->screenX;
00635 }

void pGraphicalFunction::setScreenY ( int  scrY  ) 

Definition at line 636 of file pGraphicalFunction.cxx.

References screenY.

Referenced by pPlotterWindow::onMouseMove(), pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00637 {
00638   this->screenY=scrY;
00639 }

Here is the caller graph for this function:

int pGraphicalFunction::getScreenY (  ) 

Definition at line 640 of file pGraphicalFunction.cxx.

References screenY.

00641 {
00642   return this->screenY;
00643 }

void pGraphicalFunction::setStartX ( double  aStartX  ) 

Definition at line 649 of file pGraphicalFunction.cxx.

References _startX, pLogicalFunction::getStartX(), logicFunction, and pLogicalFunction::setStartX().

Referenced by setUp().

00649                                                  {
00650         
00651         logicFunction->setStartX(aStartX);
00652         this->_startX =logicFunction->getStartX();
00653 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getStartX (  ) 

Definition at line 655 of file pGraphicalFunction.cxx.

References pLogicalFunction::getStartX(), and logicFunction.

00656 {
00657         return logicFunction->getStartX();
00658 }

Here is the call graph for this function:

void pGraphicalFunction::setStartY ( double  aStartY  ) 

Definition at line 660 of file pGraphicalFunction.cxx.

References _startY, logicFunction, and pLogicalFunction::setStartY().

Referenced by setUp().

00661 {
00662         logicFunction->setStartY(aStartY);
00663         this->_startY = aStartY;
00664 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getStartY (  ) 

Definition at line 666 of file pGraphicalFunction.cxx.

References pLogicalFunction::getStartY(), and logicFunction.

00666                                      {
00667         return logicFunction->getStartY();
00668 }

Here is the call graph for this function:

void pGraphicalFunction::setEndX ( double  aEndX  ) 

Definition at line 672 of file pGraphicalFunction.cxx.

References _endX, logicFunction, and pLogicalFunction::setEndX().

Referenced by setUp().

00673 {
00674         logicFunction->setEndX(aEndX);
00675         this->_endX = aEndX;
00676 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getEndX (  ) 

Definition at line 678 of file pGraphicalFunction.cxx.

References pLogicalFunction::getEndX(), and logicFunction.

00678                                    {
00679         return logicFunction->getEndX();
00680 }

Here is the call graph for this function:

void pGraphicalFunction::setEndY ( double  aEndY  ) 

Definition at line 682 of file pGraphicalFunction.cxx.

References _endY, logicFunction, and pLogicalFunction::setEndY().

Referenced by setUp().

00682                                              {
00683         logicFunction->setEndY(aEndY);
00684         this->_endY = aEndY;
00685 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getEndY (  ) 

Definition at line 687 of file pGraphicalFunction.cxx.

References pLogicalFunction::getEndY(), and logicFunction.

00687                                    {
00688         return logicFunction->getEndY();
00689 }

Here is the call graph for this function:

void pGraphicalFunction::setScaleX ( double  aScaleX  ) 

Definition at line 693 of file pGraphicalFunction.cxx.

References _scaleX, logicFunction, and pLogicalFunction::setScaleX().

Referenced by setScales().

00694 {
00695         logicFunction->setScaleX(aScaleX);
00696         this->_scaleX = aScaleX;
00697 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getScaleX (  ) 

Definition at line 699 of file pGraphicalFunction.cxx.

References _scaleX.

00700 {
00701         return this->_scaleX;
00702 }

void pGraphicalFunction::setScaleY ( double  aScaleY  ) 

Definition at line 704 of file pGraphicalFunction.cxx.

References _scaleY, logicFunction, and pLogicalFunction::setScaleY().

Referenced by setScales().

00705 {
00706         logicFunction->setScaleY(aScaleY);
00707         this->_scaleY = aScaleY;
00708 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getScaleY (  ) 

Definition at line 710 of file pGraphicalFunction.cxx.

References _scaleY.

Referenced by pPlotter::GetValuesPointsFunction().

00710                                      {
00711         return this->_scaleY;
00712 }

Here is the caller graph for this function:

void pGraphicalFunction::setMinX ( double  aMinX  ) 

Definition at line 716 of file pGraphicalFunction.cxx.

References _minX, logicFunction, and pLogicalFunction::setMinX().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00717 {
00718         logicFunction->setMinX(aMinX);
00719         this->_minX = aMinX;
00720 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getMinX (  ) 

Definition at line 722 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMinX(), and logicFunction.

Referenced by HistogramWidget::getActualShowedPorcentage(), HistogramWidget::getMaxShowedPorcentage(), HistogramWidget::getMinShowedPorcentage(), pPlotterWindow::InitFunctionForVectors(), pPlotterWindow::moveFunctions(), pPlotter::onChangeFunction(), and pPlotter::setAll().

00723 {
00724         return logicFunction->getMinX();
00725 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMinY ( double  aMinY  ) 

Definition at line 727 of file pGraphicalFunction.cxx.

References _minY, logicFunction, and pLogicalFunction::setMinY().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00728 {
00729         logicFunction->setMinY(aMinY);
00730         this->_minY = aMinY;
00731 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getMinY (  ) 

Definition at line 733 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMinY(), and logicFunction.

Referenced by pPlotterWindow::InitFunctionForVectors(), and pPlotterWindow::moveFunctions().

00733                                    {
00734         return logicFunction->getMinY();
00735 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMaxX ( double  aMaxX  ) 

Definition at line 739 of file pGraphicalFunction.cxx.

References _maxX, logicFunction, and pLogicalFunction::setMaxX().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00740 {
00741         logicFunction->setMaxX(aMaxX);
00742         this->_maxX = aMaxX;
00743 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getMaxX (  ) 

Definition at line 745 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMaxX(), and logicFunction.

Referenced by HistogramWidget::getActualShowedPorcentage(), getMax(), HistogramWidget::getMaxShowedPorcentage(), HistogramWidget::getMinShowedPorcentage(), pPlotterWindow::InitFunctionForVectors(), pPlotterWindow::moveFunctions(), pPlotter::onChangeFunction(), and pPlotter::setAll().

00746 {
00747         return logicFunction->getMaxX();
00748 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMaxY ( double  aMaxY  ) 

Definition at line 750 of file pGraphicalFunction.cxx.

References _maxY, logicFunction, and pLogicalFunction::setMaxY().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00751 {
00752         logicFunction->setMaxY(aMaxY);
00753         this->_maxY = aMaxY;
00754 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getMaxY (  ) 

Definition at line 756 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMaxY(), and logicFunction.

Referenced by getMax(), pPlotterWindow::InitFunctionForVectors(), and pPlotterWindow::moveFunctions().

00756                                    {
00757         return logicFunction->getMaxY();
00758 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetX ( double  aOffsetX  ) 

Definition at line 763 of file pGraphicalFunction.cxx.

References _offsetX, logicFunction, and pLogicalFunction::setOffsetX().

Referenced by pPlotterWindow::actualizeViewRange(), pPlotterWindow::moveFunctions(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00764 {
00765         logicFunction->setOffsetX(aOffsetX);
00766         this->_offsetX = aOffsetX;
00767 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getOffsetX (  ) 

Definition at line 769 of file pGraphicalFunction.cxx.

References _offsetX.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00770 {
00771         
00772         return this->_offsetX;
00773 }

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetY ( double  aOffsetY  ) 

Definition at line 775 of file pGraphicalFunction.cxx.

References _offsetY, logicFunction, and pLogicalFunction::setOffsetY().

Referenced by pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00776 {
00777         logicFunction->setOffsetY(aOffsetY);
00778         this->_offsetY = aOffsetY;
00779 }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getOffsetY (  ) 

Definition at line 781 of file pGraphicalFunction.cxx.

References _offsetY.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00781                                        {
00782         return this->_offsetY;
00783 }

Here is the caller graph for this function:

void pGraphicalFunction::setType ( int  aType  ) 

Definition at line 788 of file pGraphicalFunction.cxx.

References _type, logicFunction, and pLogicalFunction::setType().

Referenced by HistogramWidget::drawHistogram(), Histogram::drawHistogram(), HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onLine(), and pPlotterWindow::onSplinePoints().

00789 {
00790         logicFunction->setType(aType);
00791         this->_type = aType;
00792 }

Here is the call graph for this function:

Here is the caller graph for this function:

int pGraphicalFunction::getType (  ) 

Definition at line 794 of file pGraphicalFunction.cxx.

References _type.

Referenced by pPlotterWindow::addFunction(), pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), and pPlotter::update().

00794                                   {
00795         return this->_type;
00796 }

Here is the caller graph for this function:

int pGraphicalFunction::getValidPointRange (  ) 

Definition at line 801 of file pGraphicalFunction.cxx.

References validPointRange.

00802 {
00803         return validPointRange;
00804 }

void pGraphicalFunction::setValidPointRange ( int  theRange  ) 

Definition at line 806 of file pGraphicalFunction.cxx.

References logicFunction, pLogicalFunction::setValidPointRange(), and validPointRange.

00807 {
00808         logicFunction->setValidPointRange(theRange);
00809         validPointRange = theRange;
00810 }

Here is the call graph for this function:

void pGraphicalFunction::SetDrawing ( bool  d  )  [inline]

Definition at line 544 of file pGraphicalFunction.h.

References drawing.

Referenced by pPlotterWindow::onLoad(), pPlotterWindow::onStartDrawing(), and pPlotterWindow::onStopDrawing().

00545         {
00546                 drawing = d;
00547         }

Here is the caller graph for this function:

bool pGraphicalFunction::GetDrawing (  )  [inline]

Definition at line 549 of file pGraphicalFunction.h.

References drawing.

00550         {
00551                 return drawing;
00552         }

void pGraphicalFunction::SetMousePoint ( wxPoint  p  )  [inline]

Definition at line 555 of file pGraphicalFunction.h.

References mousePoint.

Referenced by pPlotterWindow::onMouseMove().

00556         { 
00557                 mousePoint = p;
00558         }

Here is the caller graph for this function:

wxPoint pGraphicalFunction::getMousePoint (  )  [inline]

Definition at line 560 of file pGraphicalFunction.h.

References mousePoint.

00561         {
00562                 return mousePoint;
00563         }

void pGraphicalFunction::setActual ( bool  act  ) 

actual

Definition at line 600 of file pGraphicalFunction.cxx.

References ifActual.

Referenced by HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onLoad(), pPlotterWindow::onStartDrawing(), and pPlotterWindow::setActualFunction().

00601 {
00602   ifActual=act;
00603 }

Here is the caller graph for this function:

bool pGraphicalFunction::getActual (  ) 

Definition at line 604 of file pGraphicalFunction.cxx.

References ifActual.

Referenced by pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00605 {
00606         return ifActual;
00607 }

Here is the caller graph for this function:

void pGraphicalFunction::setScaleWay ( int  typeS  ) 

SCALE WAY DEFECT_SCALE 1 MAX_SCALE 2 USER_SCALE 3

Definition at line 614 of file pGraphicalFunction.cxx.

References scaleWay.

Referenced by pPlotterWindow::onStartDrawing().

00615 {
00616   scaleWay=typeS;
00617 }

Here is the caller graph for this function:

int pGraphicalFunction::getScaleWay (  ) 

Definition at line 619 of file pGraphicalFunction.cxx.

References scaleWay.

00620 {
00621  return scaleWay;
00622 }

void pGraphicalFunction::setFromWindow ( bool  w  )  [inline]

set fromWindow: it is set to true if the function was created interactively

Definition at line 585 of file pGraphicalFunction.h.

References fromWindow.

Referenced by pPlotterWindow::onLoad(), and pPlotterWindow::onStartDrawing().

00586         {
00587                 fromWindow=w;
00588         }

Here is the caller graph for this function:

bool pGraphicalFunction::getFromWindow (  )  [inline]

Definition at line 593 of file pGraphicalFunction.h.

References fromWindow.

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onStartDrawing().

00594         {
00595                 return fromWindow;
00596         }

Here is the caller graph for this function:

void pGraphicalFunction::setFactorZoom ( float  factor  )  [inline]

Definition at line 600 of file pGraphicalFunction.h.

References factorZoom.

Referenced by pPlotterWindow::onLoad(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00601         {
00602                 factorZoom=factor;
00603         }

Here is the caller graph for this function:

void pGraphicalFunction::setEditable ( bool  edit  )  [inline]

Definition at line 607 of file pGraphicalFunction.h.

References editable.

Referenced by HistogramWidget::drawHistogram(), and Histogram::drawHistogram().

00608         {
00609                 editable=edit;
00610         }

Here is the caller graph for this function:

bool pGraphicalFunction::getEditable (  )  [inline]

Get editable

Definition at line 614 of file pGraphicalFunction.h.

References editable.

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onMouseMove().

00615         {
00616                 return editable;
00617         }

Here is the caller graph for this function:

bool pGraphicalFunction::getZoomB (  )  [inline]

Definition at line 626 of file pGraphicalFunction.h.

References zoomIn.

00627         {
00628                 return zoomIn;
00629         }

void pGraphicalFunction::setZoomIn ( bool  z  )  [inline]

Definition at line 634 of file pGraphicalFunction.h.

References zoomIn.

00635         {
00636                 zoomIn=z;
00637         }

void pGraphicalFunction::setInitialDrawPoint ( pFunctionPoint initialPoint  )  [inline]

Set the initial drawing point

Parameters:
pFunctionPoint* initialPoint

Definition at line 642 of file pGraphicalFunction.h.

References initialDrawingPoint.

00643         {
00644                 initialDrawingPoint=initialPoint;       
00645         }

pFunctionPoint* pGraphicalFunction::getInitialDrawPoint (  )  [inline]

Get the initial drawing point

Returns:
initialDrawingPoint

Definition at line 650 of file pGraphicalFunction.h.

References initialDrawingPoint.

00651         {
00652                 return initialDrawingPoint;     
00653         }

void pGraphicalFunction::setFinalDrawPoint ( pFunctionPoint finalPoint  )  [inline]

Set the final drawing point

Parameters:
pFunctionPoint* finalPoint

Definition at line 658 of file pGraphicalFunction.h.

References finalDrawingPoint.

00659         {
00660                 finalDrawingPoint=finalPoint;   
00661         }

pFunctionPoint* pGraphicalFunction::getFinallDrawPoint (  )  [inline]

Get the final drawing point

Returns:
finalDrawingPoint

Definition at line 666 of file pGraphicalFunction.h.

References finalDrawingPoint.

00667         {
00668                 return finalDrawingPoint;       
00669         }

void pGraphicalFunction::zooming ( int  clickedX,
int  clickedY,
int  width 
)

This method set the initial point and the final point of drawing according with the width of the square around the point clicked

Parameters:
clickedX 
clickedY 
width,: width of the square
This method set the initial point and the final point of drawing according with the width of the square around the point clicked
Parameters:
clickedX 
clickedY 
width,: width of the square Note: all the parameters are pixels Pre: screenX, screenY, zoom are set! with the actual data. DEPRECATED!

Definition at line 440 of file pGraphicalFunction.cxx.

References _offsetX, _offsetY, _scaleX, _scaleY, finalDrawingPoint, pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), getSizePoints(), initialDrawingPoint, logicFunction, setScales(), and zoomIn.

00441 {
00442         int xS,yS,x1,x2,y1,y2;
00443         setScales();
00444         xS=clickedX/_scaleX+_offsetX;
00445         yS=clickedY/_scaleY+_offsetY;
00446         //square
00447         x1=(clickedX-width)/_scaleX+_offsetX;
00448         x2=(clickedX+width)/_scaleX+_offsetX;
00449         y1=(clickedY-width)/_scaleY+_offsetY;
00450         y2=(clickedY+width)/_scaleY+_offsetY;
00451 
00452         int numberPoints=getSizePoints();
00453         pFunctionPoint* point;
00454         wxNode* p;
00455         bool inSquare=false,first=false;
00456         
00457         //if the user made a zoom
00458         if(zoomIn)
00459         {
00460                 int i;
00461                 for(i=0; i<numberPoints;i++)
00462                 {
00463                         p=logicFunction->GetPointAt(i);
00464                         point=(pFunctionPoint*)p->GetData();
00465                         int rx=point->getRealX();
00466                         int ry=point->getRealY();
00467                         inSquare= rx>=x1 && rx<=x2; //&& ry>=y1 && ry<=y2;
00468                         if(inSquare)
00469                         {
00470                                 if(!first)
00471                                 {
00472                                         initialDrawingPoint=point;
00473                                         _offsetX=rx;
00474                                         _offsetY=ry;
00475                                         first=true;
00476                                 }
00477                                 finalDrawingPoint=point;
00478                         }
00479                 }
00480         }       
00481         else
00482         {
00483                 //We extend the range of vision in x and y,20 and 10 respectively
00484                 if((_offsetX-20)>=0)
00485                 {
00486                         _offsetX=_offsetX-20;
00487                 }
00488                 else
00489                         _offsetX=0;
00490                 if((_offsetY-10)>=0)
00491                 {
00492                         _offsetY=_offsetY-10;
00493                 }
00494                 else
00495                         _offsetY=0;
00496         }
00497 }

Here is the call graph for this function:

void pGraphicalFunction::setOffsets ( int  offx,
int  offy 
)

Definition at line 508 of file pGraphicalFunction.cxx.

References _offsetX, _offsetY, _scaleX, _scaleY, minShowedX, minShowedY, offsetPixelX, offsetPixelY, setOffsetPixelX(), setOffsetPixelY(), setOffsetX(), setOffsetY(), and setScales().

Referenced by pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00509         {
00510                 int xS,yS;
00511 
00512                 setScales();
00513                 
00514                 xS=(offx-offsetPixelX)/_scaleX+_offsetX + minShowedX;
00515                 yS=(offy-offsetPixelY)/_scaleY+_offsetY+ minShowedY;
00516                 
00517                 setOffsetX(xS);
00518                 setOffsetY(yS);
00519                         
00520                 //setMinShowedX(xS);
00521                 //setMinShowedY(yS);
00522 
00523                 setOffsetPixelX(offx);
00524                 setOffsetPixelY(offy);
00525                 //setMinShowed();
00526         }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMinShowed (  ) 

Definition at line 536 of file pGraphicalFunction.cxx.

References _offsetX, _offsetY, pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), logicFunction, node, setMinShowedX(), and setMinShowedY().

00537         {
00538                 bool firstX=false,firstY=false;
00539                 
00540                 wxNode* node=logicFunction->GetPointAt(0);
00541                 pFunctionPoint* p;
00542 
00543                 //float middleWX=(((float)(screenX-100))/2)/scaleX; // JPRx
00544                 //float middleWY=(((float)(screenY-50))/2)/scaleY; // JPRx
00545                 
00546                 //node=node->GetNext(); 
00547                 while(node)
00548                 {
00549                         p=(pFunctionPoint*)node->GetData();
00550                         int px=p->getRealX();
00551                         int py=p->getRealY();
00552                         int x=(px-_offsetX);//+middleWX;
00553                         int y=(py-_offsetY);//+middleWY;
00554                         if(!firstX && x>=0)
00555                         {
00556                                 firstX=true;
00557                                 setMinShowedX(px);
00558                         }
00559                         if(!firstY && y>=0)
00560                         {
00561                                 firstY=true;
00562                                 setMinShowedY(py);
00563                         }       
00564                         node=node->GetNext();
00565                 }
00566         }

Here is the call graph for this function:

int pGraphicalFunction::getMinXShowed (  )  [inline]

Get the minX Showed

Definition at line 696 of file pGraphicalFunction.h.

References minShowedX.

Referenced by getMinShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), pPlotter::onChangeFunction(), pPlotterWindow::setActualScales(), and pPlotter::setAll().

00697         {
00698                 return minShowedX;
00699         }

Here is the caller graph for this function:

int pGraphicalFunction::getMinYShowed (  )  [inline]

Get the minY Showed

Definition at line 703 of file pGraphicalFunction.h.

References minShowedY.

Referenced by getMinShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), and pPlotterWindow::setActualScales().

00704         {
00705                 return minShowedY;
00706         }

Here is the caller graph for this function:

int pGraphicalFunction::getMaxXShowed (  )  [inline]

Get the maxX Showed

Definition at line 710 of file pGraphicalFunction.h.

References maxShowedX.

Referenced by getMaxShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), pPlotter::onChangeFunction(), pPlotterWindow::setActualScales(), and pPlotter::setAll().

00711         {
00712                 return maxShowedX;
00713         }

Here is the caller graph for this function:

int pGraphicalFunction::getMaxYShowed (  )  [inline]

Get the maxY Showed

Definition at line 717 of file pGraphicalFunction.h.

References maxShowedY.

Referenced by getMaxShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), and pPlotterWindow::setActualScales().

00718         {
00719                 return maxShowedY;
00720         }

Here is the caller graph for this function:

void pGraphicalFunction::setMinShowedX ( int  msx  )  [inline]

Set the minShowedX

Definition at line 724 of file pGraphicalFunction.h.

References minShowedX.

Referenced by pPlotterWindow::actualizeViewRange(), pPlotterWindow::InitFunctionForVectors(), load(), pPlotterWindow::moveFunctions(), pPlotterWindow::onStartDrawing(), and setMinShowed().

00725         {
00726                 minShowedX=msx;
00727         }

Here is the caller graph for this function:

void pGraphicalFunction::setMinShowedY ( int  msy  )  [inline]

Set the minShowedY

Definition at line 731 of file pGraphicalFunction.h.

References minShowedY.

Referenced by pPlotterWindow::InitFunctionForVectors(), load(), pPlotterWindow::onStartDrawing(), and setMinShowed().

00732         {
00733                 minShowedY=msy;
00734         }

Here is the caller graph for this function:

void pGraphicalFunction::setMaxShowedX ( int  msx  )  [inline]

Set the maxShowedX

Definition at line 738 of file pGraphicalFunction.h.

References maxShowedX.

Referenced by pPlotterWindow::actualizeViewRange(), pPlotterWindow::InitFunctionForVectors(), load(), pPlotterWindow::moveFunctions(), and pPlotterWindow::onStartDrawing().

00739         {
00740                 maxShowedX=msx;
00741         }

Here is the caller graph for this function:

void pGraphicalFunction::setMaxShowedY ( int  msy  )  [inline]

Set the minShowedY

Definition at line 745 of file pGraphicalFunction.h.

References maxShowedY.

Referenced by pPlotterWindow::InitFunctionForVectors(), load(), and pPlotterWindow::onStartDrawing().

00746         {
00747                 maxShowedY=msy;
00748         }

Here is the caller graph for this function:

int pGraphicalFunction::getOffsetPixelsX (  )  [inline]

Gets the x-offset of the zoom in pixels

Definition at line 758 of file pGraphicalFunction.h.

References offsetPixelX.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00759         {
00760                 return offsetPixelX;
00761         }       

Here is the caller graph for this function:

int pGraphicalFunction::getOffsetPixelsY (  )  [inline]

Gets the offset of the zoom in pixels

Definition at line 767 of file pGraphicalFunction.h.

References offsetPixelY.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00768         {
00769                 return offsetPixelY;
00770         }

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetPixelX ( int  offX  )  [inline]

Set the x-offset of the zoom

Definition at line 774 of file pGraphicalFunction.h.

References offsetPixelX.

Referenced by pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00775         {
00776                 offsetPixelX=offX;
00777         }

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetPixelY ( int  offY  )  [inline]

Set the y-offset of the zoom

Definition at line 781 of file pGraphicalFunction.h.

References offsetPixelY.

Referenced by pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00782         {
00783                 offsetPixelY=offY;
00784         }       

Here is the caller graph for this function:

void pGraphicalFunction::setColorPoints ( std::vector< pColorPoint * > &  colorVector  ) 

Definition at line 824 of file pGraphicalFunction.cxx.

References f_colorPoints.

00825 {
00826         f_colorPoints.clear();
00827         int i = 0;      
00828         while(i<(int)(colorVector.size()))
00829         {
00830                 f_colorPoints.push_back(colorVector[i]);                
00831                 i++;
00832         }
00833 }

void pGraphicalFunction::getColorPoints ( std::vector< pColorPoint * > &  colorVector  ) 

Definition at line 839 of file pGraphicalFunction.cxx.

References f_colorPoints, pColorPoint::getColor(), pColorPoint::getRealX(), and pColorPoint::isTemporalColor().

00840 {
00841         int i = 0;      
00842         while(i<(int)(f_colorPoints.size()))
00843         {
00844                 pColorPoint * originaslPoint = f_colorPoints[i];
00845                 pColorPoint * copyPoint = new pColorPoint(originaslPoint->getRealX(), originaslPoint->getColor(), originaslPoint->isTemporalColor());
00846                 colorVector.push_back(copyPoint);               
00847                 i++;
00848         }
00849 }

Here is the call graph for this function:

void pGraphicalFunction::setmType ( int  mt  )  [inline]

Definition at line 802 of file pGraphicalFunction.h.

References mType.

Referenced by HistogramWidget::drawHistogram(), and Histogram::drawHistogram().

00803         {
00804                 mType=mt;
00805         }

Here is the caller graph for this function:

void pGraphicalFunction::setXTraslation ( int  xT  )  [inline]

Set the value of the traslation in the x-axis

Parameters:
xT value in pixels of the traslation in x-axis

Definition at line 814 of file pGraphicalFunction.h.

References xTraslation.

00815         {
00816                  xTraslation=xT;
00817         }

bool pPlotterLayer::initializePolygon ( wxPoint *  points,
double  x1,
double  y1,
double  x2,
double  y2 
) [inherited]

Definition at line 192 of file pPlotterLayer.cxx.

Referenced by pPlotterLayer::drawFunction(), and pPlotterLayer::drawSplineCurve().

00193 {
00194         bool setted=false;
00195 
00196                 //intercepts
00197         float m=((float)(y2-y1))/(x2-x1);
00198         float x0=-y1/m+x1;
00199         float y0=-m*x1+y1;      
00200 
00201         if(points[0].x<=0&& points[1].x<=0 && points[0].y<=0&& points[1].y<=0)
00202         {
00203         
00204                 //int offsetpx=getOffsetPixelsXv(); //JPRx      
00205 
00206                 //analyzing the curve
00207 
00208                         if(x1<=0 && x2>=0)
00209                         {
00210                                 if(y2>=0 && y1>=0)
00211                                 {
00212                                                 //dc.DrawLine(0,y0, x2,y2);
00213                                                 points[0].x=0;
00214                                                 points[0].y=y0;
00215                                                 points[1].x=x2;
00216                                                 points[1].y=y2;
00217                                                 setted=true;                                    
00218                                         
00219                                 }
00220                                 else if(y2<=0 && y1>=0)
00221                                 {
00222                                         if(y0>=0 && x0>=0)
00223                                         {
00224                                                 //dc.DrawLine(0,y0,x0,0 );
00225                                                 points[0].x=0;
00226                                                 points[0].y=y0;
00227                                                 points[1].x=x0;
00228                                                 points[1].y=0;
00229                                                 setted=true;    
00230 
00231                                         }
00232                                                 
00233                                 }
00234                                 else if(y2>=0 && y1<=0)
00235                                 {       
00236                                         if(y0>=0) 
00237                                         {       
00238                                                 //dc.DrawLine(0,y0,x2,y2 );
00239                                                 points[0].x=0;
00240                                                 points[0].y=y0;
00241                                                 points[1].x=x2;
00242                                                 points[1].y=y2;
00243                                                 setted=true;    
00244                                         }
00245                                 }
00246                 
00247                         }
00248 
00249                         if(x1>=0 && x2>=0)
00250                         {
00251                                 if(y1>=0 && y2>=0 )
00252                                 {
00253                                         //dc.DrawLine(x1,y1, x2,y2);
00254                                         points[0].x=x1;
00255                                         points[0].y=y1;
00256                                         points[1].x=x2;
00257                                         points[1].y=y2;
00258                                         setted=true;    
00259                                 }
00260                                 else if(y1>=0 && y2<=0)
00261                                 {
00262                                         //dc.DrawLine(x1,y1,x0,0 );
00263                                         points[0].x=x1;
00264                                         points[0].y=y1;
00265                                         points[1].x=x0;
00266                                         points[1].y=0;
00267                                         setted=true;    
00268                                 }
00269                                 else if(y1<=0 && y2>=0) 
00270                                 {       
00271                                         //dc.DrawLine(x0,0,x2,y2);
00272                                         points[0].x=x0;
00273                                         points[0].y=0;
00274                                         points[1].x=x2;
00275                                         points[1].y=y2;
00276                                         setted=true;    
00277                                 }
00278                         }
00279                         else
00280                         return setted;
00281         }
00282         else
00283                 return setted;
00284         return setted; 
00285 }

Here is the caller graph for this function:

void pPlotterLayer::draw ( wxDC &  dc,
mpWindow w,
double  x1,
double  y1,
double  x2,
double  y2,
int  orgy 
) [inherited]

Definition at line 44 of file pPlotterLayer.cxx.

References mpLayer::GetYTranslated().

Referenced by pPlotterLayer::drawFunction(), and pPlotterLayer::drawSplineCurve().

00045 {
00046         
00047         //intercepts
00048         float m=((float)(y2-y1))/(x2-x1);
00049         float x0=-y1/m+x1;
00050         float y0=-m*x1+y1;      
00051 
00052         double sizedc = dc.GetSize().GetHeight()-orgy;
00053 
00054         //analyzing the curve
00055 
00056                 if(x1<=0 && x2>=0)
00057                 {
00058                         if(y2>=0 && y1>=0)
00059                                         dc.DrawLine(0,GetYTranslated(sizedc,y0), x2,GetYTranslated(sizedc,y2));
00060 
00061                         else if(y2<=0 && y1>=0)
00062                         {
00063                                 if(y0>=0 && x0>=0)
00064                                         dc.DrawLine(0,GetYTranslated(sizedc,y0),x0,GetYTranslated(sizedc,0) );
00065                         }
00066                         else if(y2>=0 && y1<=0)
00067                         {
00068                                 if(y0>=0) 
00069                                 dc.DrawLine(0,GetYTranslated(sizedc,y0),x2,GetYTranslated(sizedc,y2) );
00070                         }
00071         
00072                 }
00073 
00074                 if(x1>=0 && x2>=0)
00075                 {
00076                         if(y1>=0 && y2>=0 )
00077                                 dc.DrawLine(x1,GetYTranslated(sizedc,y1), x2,GetYTranslated(sizedc,y2));
00078                         else if(y1>=0 && y2<=0)
00079                                 dc.DrawLine(x1,GetYTranslated(sizedc,y1),x0,GetYTranslated(sizedc,0) );
00080                         else if(y1<=0 && y2>=0) 
00081                                         dc.DrawLine(x0,GetYTranslated(sizedc,0),x2,GetYTranslated(sizedc,y2));
00082                 }
00083                 
00084                 
00085 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawSplineCurve ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw the function with th spline points

Definition at line 91 of file pPlotterLayer.cxx.

References pPlotterLayer::draw(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getmType(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), pPlotterLayer::getXSpline(), pPlotterLayer::getYSpline(), mpLayer::GetYTranslated(), pPlotterLayer::initializePolygon(), pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00092 {
00093         std::vector<double> vx=getXSpline();
00094         std::vector<double> vy=getYSpline();
00095         wxPoint* ppoints;
00096         
00097         int /*counter=0,*/ minX,maxX,minY,maxY; // JPRx
00098         /*
00099         This is the offset of every point scale to the window
00100         pixel
00101         */
00102         int offsetpx=getOffsetPixelsXv();
00103         int offsetpy=getOffsetPixelsYv();
00104         
00105         // type of plotter
00106         int type=getmType();
00107  
00108         wxPoint point;
00109         /***********/
00110         getMaxShowed(maxX,maxY);
00111         getMinShowed(minX,minY);
00112         /***********/
00113 
00114         
00115         if(type==2)
00116         {
00117          /*
00118                 Fill the function if it represented an histogram
00119           */
00120                 ppoints=(wxPoint*)malloc(sizeof(int)*2*(vx.size()+2));
00121                 //initialize points
00122                 point.x=-5000;
00123                 point.y=-5000;
00124                 ppoints[0]=point;
00125                 ppoints[1]=point;
00126         }
00127         
00128         int size=vx.size();
00129         int j=2;
00130 
00131         for(int i=0;(i+1)< size;i++)
00132         {
00133                 
00134                 
00135                 double cxi=(vx.at(i)-minX-offsetX)*scaleX+offsetpx;
00136                 double cyi=(vy.at(i)-minY-offsetY)*scaleY+offsetpy;
00137                 
00138                 double cxj=(vx.at(i+1)-minX-offsetX)*scaleX+offsetpx;
00139                 double cyj=(vy.at(i+1)-minY-offsetY)*scaleY+offsetpy;
00140                 
00141                 
00142                 if(type!=2)     
00143                         draw(dc,w,cxi,cyi,cxj,cyj,orgy);
00144                 else if(type==2)
00145                 {
00146                         if(!initializePolygon(ppoints,cxi,cyi,cxj,cyj) && ((cxi<=0 && cxj>=0)||(cxi>=0 && cxj>=0)))
00147                         {
00148                                         point.x=cxj;
00149                                         point.y=cyj;
00150                                         ppoints[j]=point;
00151                                         j++;
00152                 
00153                         }
00154                 }
00155                 
00156         }
00157         if(type==2)
00158         {
00159                 //point.x=vx.at(size-1)* scaleX + offsetpx;
00160                 point.x=ppoints[j-1].x;
00161                 point.y=0;
00162                 //ppoints[vx.size()]=point;
00163                 ppoints[j]=point;
00164                 /*
00165                 Fill the function if it represented an histogram
00166           */
00167                 //ppoints=(wxPoint*)malloc(sizeof(int)*2*(vx.size()+1));
00168                 //settings for fill
00169                 //point.x=vx.at(0)*scaleX + offsetpx;
00170                 point.x=ppoints[0].x;
00171                 point.y=0;
00172                 //ppoints[vx.size()+1]=point;
00173                 ppoints[j+1]=point;
00174 
00175                 dc.SetBrush(wxBrush( wxColour(239,238,242) ,wxSOLID  ));
00176                 dc.SetPen(wxPen( wxColour(0,0,0) ,1,wxSOLID  ));
00177                 //dc.DrawPolygon(vx.size()+2,ppoints,0,0);
00178                 for(int i = 0; i <= j + 1; i++){
00179                         int sizedc = dc.GetSize().GetHeight()-orgy;
00180                         ppoints[i].y = GetYTranslated(sizedc, ppoints[i].y);
00181                 }       
00182                 dc.DrawPolygon(j+2,ppoints,0,0);
00183         }
00184         
00185         
00186 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawLineToMousePoint ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw the line between the last point of the function and the position of the mouse

Definition at line 461 of file pPlotterLayer.cxx.

References mpWindow::drawGuideLines(), pPlotterLayer::getDirection(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getMousePoint(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), pPlotterLayer::GetPoints(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), pPlotterLayer::getSize(), pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::points, pPlotterLayer::Rewind(), pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00462 {
00463         int x,y,sizeP,maxX,maxY,minX,minY;
00464         bool direction;
00465         
00466         Rewind();
00467         
00468         getMousePoint(x,y);
00469         getDirection(direction);
00470         getSize(sizeP);
00471         //Lines betwen the points
00472         GetPoints(points);
00473 
00474         wxNode *node=points.GetLast();
00475         wxNode *node1=points.GetFirst();
00476         
00477         
00478         /*
00479         This is the offset of every point scale to the window
00480         pixel
00481         */
00482         int offsetpx = getOffsetPixelsXv();
00483         int offsetpy = getOffsetPixelsYv();
00484         /***********/
00485         getMaxShowed(maxX,maxY);
00486         getMinShowed(minX,minY);
00487         /***********/
00488         //traslation
00489 //      int xTraslation=getXTraslation(); //EED
00490         
00491         if(node)
00492         {
00493                 pFunctionPoint* lastPoint=(pFunctionPoint*)node->GetData();
00494                 pFunctionPoint* firstPoint=(pFunctionPoint*)node1->GetData();
00495 
00496                 //LeftDrawing
00497                 if(lastPoint->getRealX()<x && direction && sizeP >=2)
00498                         
00499                         dc.DrawLine((lastPoint->getRealX()-minX-offsetX)*scaleX + offsetpx,(lastPoint->getRealY()-minY-offsetY)*scaleY+ offsetpy, (x-minX)*scaleX + offsetpx, (y-minY)*scaleY + offsetpy);
00500                 
00501                 //right drawing
00502                 else if(firstPoint->getRealX()>x && !direction && sizeP >=2 )
00503                         
00504                         dc.DrawLine((firstPoint->getRealX()-minX-offsetX)*scaleX+ offsetpx,(firstPoint->getRealY()-minY-offsetY)*scaleY+ offsetpy,(x-minX)*scaleX+ offsetpx, (y-minY)*scaleY+ offsetpy);
00505                 
00506                 //just a point
00507                 else if(sizeP==1 )
00508                 {
00509                         dc.DrawLine((lastPoint->getRealX()-minX-offsetX)*scaleX + offsetpx,(lastPoint->getRealY()-minY-offsetY)*scaleY+ offsetpy, (x-minX)*scaleX+ offsetpx, (y-minY)*scaleY+ offsetpy);
00510                 }
00511         }                       
00512         
00513         if( w.drawGuideLines() )  
00514         {
00515                 dc.SetPen(wxPen(  wxColour(255,0,0),1,wxDOT ));
00516                 // Drawing the horizontal guide line    
00517                 dc.DrawLine( 0, (y-minY)*scaleY + offsetpy, (x-minX)*scaleX + offsetpx, (y-minY)*scaleY + offsetpy);                                    
00518                 // Drawing the vertical guide line      
00519                 dc.DrawLine( (x-minX)*scaleX + offsetpx,0, (x-minX)*scaleX + offsetpx, (y-minY)*scaleY + offsetpy);     
00520         }
00521 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawFunction ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw le lines between the points of the function

Draw the lines between the points of the function

Definition at line 290 of file pPlotterLayer.cxx.

References pPlotterLayer::draw(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getmType(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), pPlotterLayer::GetPoints(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), mpLayer::GetYTranslated(), pPlotterLayer::initializePolygon(), pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::points, pPlotterLayer::Rewind(), pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00291 {
00292 
00293         
00294         int scrwX,scrwY,offsetpx,offsetpy,maxX,minX,maxY,minY;
00295         wxPoint* ppoints=NULL;
00296 
00297         /*
00298         This is the offset of every point scale to the window
00299         pixel
00300         */
00301         offsetpx=getOffsetPixelsXv();
00302         offsetpy=getOffsetPixelsYv();   
00303 
00304         Rewind();
00305         
00306         dc.GetSize(&scrwX, &scrwY);
00307         
00308         //Lines between the points
00309 
00310         int sizedc = dc.GetSize().GetHeight()-orgy;
00311         
00312         GetPoints(points);
00313 
00314         // type of plotter
00315         int type=getmType();
00316         /***********/
00317         getMaxShowed(maxX,maxY);
00318         getMinShowed(minX,minY);
00319         /***********/
00320 
00321         //traslation
00322         //int xTraslation=getXTraslation(); //JPRx
00323         wxNode* node= points.GetFirst();
00324         // int i=1;//points.GetCount()+1; //JPRx
00325         int j=2;
00326         /*
00327          Fill it if it is an histogram
00328         */
00329         wxPoint point;
00330         // pFunctionPoint* pointk; //JPRx
00331         if(type==2)
00332         {
00333                 /*
00334                 Fill the function if it represented an histogram
00335           */
00336                 ppoints=(wxPoint*)malloc(sizeof(int)*2*(points.GetCount()+2));
00337                 //initialize points
00338                 point.x=-5000;
00339                 point.y=GetYTranslated(sizedc,-5000);
00340                 ppoints[0]=point;
00341                 ppoints[1]=point;
00342 
00343         }
00344         
00345         
00346         while (node!=NULL && node->GetNext()!=NULL)
00347         { 
00348                 pFunctionPoint* pointi=(pFunctionPoint*)node->GetData();
00349                                 wxNode* nextNode=node->GetNext();
00350                 pFunctionPoint* pointj=(pFunctionPoint*)nextNode->GetData();
00351                                                 
00352                 // we do the offset
00353                 int pxi=(pointi->getRealX()-minX)-offsetX;
00354                 int pyi=(pointi->getRealY()-minY)-offsetY;
00355                 int pxj=(pointj->getRealX()-minX)-offsetX;
00356                 int pyj=(pointj->getRealY()-minY)-offsetY;
00357 
00358 
00359                 int cxi=pxi* scaleX + offsetpx; //+ xTraslation;
00360                 int cxj=pxj* scaleX + offsetpx; //+ xTraslation;
00361                 int cyi=pyi* scaleY+ offsetpy ;
00362                 int cyj=pyj* scaleY+ offsetpy ;
00363                 //dc.DrawLine(pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy );
00364                 if(type!=2)
00365                         draw(dc,w,pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy,orgy );
00366                         //dc.DrawLine(pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy );
00367                 else if(type==2)
00368                 {
00369                         if(!initializePolygon(ppoints,cxi,cyi,cxj,cyj) && ((cxi<=0 && cxj>=0)||(cxi>=0 && cxj>=0)))
00370                         {
00371                                         point.x=cxj;
00372                                         point.y=GetYTranslated(sizedc,cyj);
00373                                         ppoints[j]=point;
00374                                         j++;
00375                 
00376                         }
00377                 }
00378                 
00379                 node=node->GetNext();
00380 
00381         } 
00382         if(type==2)
00383         {
00384                 //point.x=vx.at(size-1)* scaleX + offsetpx;
00385                 point.x=ppoints[j-1].x;
00386                 point.y=GetYTranslated(sizedc,0);
00387                 //ppoints[vx.size()]=point;
00388                 ppoints[j]=point;
00389                 /*
00390                 Fill the function if it represented an histogram
00391           */
00392                 //ppoints=(wxPoint*)malloc(sizeof(int)*2*(vx.size()+1));
00393                 //settings for fill
00394                 //point.x=vx.at(0)*scaleX + offsetpx;
00395                 point.x=ppoints[0].x;
00396                 point.y=GetYTranslated(sizedc,0);
00397                 //ppoints[vx.size()+1]=point;
00398                 ppoints[j+1]=point;
00399 
00400                 dc.SetBrush(wxBrush( wxColour(239,238,242) ,wxSOLID  ));
00401                 dc.SetPen(wxPen( wxColour(0,0,0) ,1,wxSOLID  ));
00402                 //dc.DrawPolygon(vx.size()+2,ppoints,0,0);
00403                 dc.DrawPolygon(j+2,ppoints,0,0);
00404 
00405         }
00406         
00407 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawPoints ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw the points of the function

Definition at line 412 of file pPlotterLayer.cxx.

References pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::GetNextXY(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), mpLayer::GetYTranslated(), MOVE, pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::points, pPlotterLayer::Rewind(), pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00413 {
00414         
00415         Rewind();
00416         double x, y;
00417         int minX,maxX,minY,maxY;
00418 
00419         double sizedc = dc.GetSize().GetHeight()-orgy;
00420         
00421         /*
00422         This is the offset of every point scale to the window
00423         pixel
00424         */
00425         int offsetpx=getOffsetPixelsXv();
00426         int offsetpy=getOffsetPixelsYv();
00427         //traslation
00428 //      int xTraslation=getXTraslation();  //EED
00429         /*wxPen mypen(*wxBLACK, 5, wxSOLID);
00430         dc.SetPen(mypen);*/
00431         /***********/
00432         getMaxShowed(maxX,maxY);
00433         getMinShowed(minX,minY);
00434         /***********/
00435         //we have to draw the points
00436 
00437         while (GetNextXY(x, y))
00438         {
00439                 //GetNextXY(x, y);
00440                 //set the points of the polygons
00441                 wxPoint points[4];
00442                 dc.SetBrush(wxBrush( wxColour(255,0,0),wxSOLID  ));
00443                 //dc.SetPen(wxPen(wxColour(0,0,0),1,wxSOLID) );
00444                 points[0].x=((x-minX-offsetX)*scaleX + offsetpx-MOVE);
00445                 points[0].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy-MOVE));
00446                 points[1].x=((x-minX-offsetX)*scaleX+ offsetpx+MOVE);
00447                 points[1].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy-MOVE));
00448                 points[2].x=((x-minX-offsetX)*scaleX+ offsetpx+MOVE);
00449                 points[2].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy+MOVE));
00450                 points[3].x=((x-minX-offsetX)*scaleX+ offsetpx-MOVE);
00451                 points[3].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy+MOVE));
00452                 if((x-minX-offsetX)*scaleX >=0 && (y-minY-offsetY/*w.getMinScrY()*/)*scaleY>=0)
00453                 dc.DrawPolygon(4,points,0,0);
00454         }
00455 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::Plot ( wxDC &  dc,
mpWindow w 
) [virtual, inherited]

Layer plot handler. This implementation will plot the locus in the visible area and put a label according to the aligment specified.

Layer plot handler. This implementation will plot the locus in the visible area and put a label according to the aligment specified.

Implements mpLayer.

Reimplemented in pPlotterScaleX, and pPlotterScaleY.

Definition at line 529 of file pPlotterLayer.cxx.

References pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterLayer::getDrawing(), pPlotterLayer::getFactorZoom(), pPlotterLayer::getIfActual(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsets(), mpWindow::getRealGuideX(), mpWindow::getRealGuideY(), mpLayer::GetYTranslated(), pPlotterLayer::ifShowPoints(), mpLayer::m_pen, pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::scaleX, pPlotterLayer::scaleY, mpWindow::SetScaleX(), mpWindow::SetScaleY(), and pPlotterLayer::vGetType().

00530 {
00531         bool show,drawing,actual;
00532         int scrwX,scrwY,maxX,maxY,minX,minY,type;
00533         float factorZoom;
00534         
00535         ifShowPoints(show);
00536         getDrawing(drawing);
00537         type=vGetType();
00538         
00539         dc.SetPen( m_pen);
00540         
00541         /*
00542          * Managing the scale and zoom
00543          */
00544         
00545         dc.GetSize(&scrwX, &scrwY);
00546         
00547         getIfActual(actual);
00548         //getMax(maxX, maxY);
00549         /***********/
00550         getMaxShowed(maxX,maxY);
00551         getMinShowed(minX,minY);
00552         /***********/
00553         getFactorZoom(factorZoom);
00554         getOffsets(offsetX,offsetY);
00555         /*
00556         maxX=w.getMaxScrX();
00557         maxY=w.getMaxScrY();
00558         minX=w.getMinScrX();
00559         minY=w.getMinScrY();
00560         */
00561         if((maxX-minX)!=0 && (maxY-minY)!=0)
00562         {
00563                 
00564                 scaleX=(((double)scrwX-100)/(maxX-minX))*factorZoom;
00565                 scaleY=(((double)scrwY-50)/(maxY-minY))*factorZoom;
00566                 
00567                 if(actual)
00568                 {
00569                         w.SetScaleX(scaleX);
00570                         w.SetScaleY(scaleY);
00571                         //w.setMinScrX(offsetX);
00572                         //w.setMinScrY(offsetY);
00573                 }
00574                 
00575         }
00576         /*
00577                 Managing the drawing
00578         */
00579         int orgx=70;
00580 
00581         
00582 //EED 14Mai2009
00583 //      int orgy=w.GetScrY()-40;
00584 //      dc.SetDeviceOrigin( orgx ,orgy);
00585 //      dc.SetAxisOrientation(true,true);
00586         
00587         int orgy = 40;  
00588         //dc.SetDeviceOrigin( orgx ,orgy);
00589         dc.SetDeviceOrigin( orgx ,0);
00590         int sizedc = dc.GetSize().GetHeight()-orgy;
00591         //dc.SetAxisOrientation(true,false);
00592 
00593         
00594 
00595         //if the user dont want to see the points of the function and if he stops drawing
00596         //we have to draw the function
00597         if(!show && !drawing && type==1)
00598                 drawFunction(dc,w,orgy);
00599         else if(!show && !drawing && type==2)
00600                 drawSplineCurve(dc,w,orgy);
00601         //we just draw the point that the user just clicked
00602         else if(drawing && type==1)
00603         { 
00604                 drawFunction(dc,w,orgy);
00605                 drawLineToMousePoint(dc,w,orgy);
00606                 drawPoints(dc,w,orgy);
00607         }
00608         else if(drawing && type==1)
00609         {
00610                 drawSplineCurve(dc,w,orgy);
00611                 drawLineToMousePoint(dc,w,orgy);
00612                 drawPoints(dc,w,orgy);
00613         }
00614         else if(show && type==1)
00615         {
00616                 drawFunction(dc,w,orgy);
00617                 drawPoints(dc,w,orgy);
00618         }
00619         else if(show && type==2)
00620         {
00621                 drawSplineCurve(dc,w,orgy);
00622                 drawPoints(dc,w,orgy);
00623         }
00624 
00625         // Drawing the guides according to real values entered according to the integrated interaction (IS NOT WORKING!!!)
00626         if ( actual )
00627         {
00628                 dc.SetPen(wxPen(  wxColour(255,0,0),1,wxDOT ));
00629                 int offsetpx = getOffsetPixelsXv();
00630 //              int offsetpy = getOffsetPixelsYv();  //EED
00631 
00632                 int realX_guide = w.getRealGuideX();
00633                 if( realX_guide!=-1 )
00634                 {
00635                 dc.DrawLine( (realX_guide/*-w.getMinScrX()*/-offsetX)*scaleX + offsetpx, 
00636                         GetYTranslated(sizedc,0), 
00637                         (realX_guide/*-w.getMinScrX()*/-offsetX)*scaleX + offsetpx, 
00638                         GetYTranslated(sizedc,scrwY));                  
00639                 }
00640                         
00641                 int realY_guide = w.getRealGuideY();
00642                 if( realY_guide!=-1 )
00643                 {
00644                         dc.DrawLine( 0,
00645                                 GetYTranslated(sizedc,(realY_guide/*-w.getMinScrY()*/-offsetX)*scaleX + offsetpx), 
00646                                 scrwX, 
00647                                 GetYTranslated(sizedc,(realY_guide/*-w.getMinScrY()*/-offsetX)*scaleX + offsetpx));
00648                 }
00649         }
00650    
00651 }

Here is the call graph for this function:

virtual bool mpLayer::HasBBox (  )  [inline, virtual, inherited]

Check whether this layer has a bounding box. The default implementation returns TRUE. Overide and return FALSE if your mpLayer implementation should be ignored by the calculation of the global bounding box for all layers in a mpWindow.

Return values:
TRUE Has bounding box
FALSE Has not bounding box

Reimplemented in mpScaleX, mpScaleY, pPlotterScaleX, and pPlotterScaleY.

Definition at line 110 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00110 { return TRUE; }

Here is the caller graph for this function:

virtual double mpLayer::GetMinX (  )  [inline, virtual, inherited]

Get inclusive left border of bounding box.

Returns:
Value

Definition at line 115 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00115 { return -1.0; }

Here is the caller graph for this function:

virtual double mpLayer::GetMaxX (  )  [inline, virtual, inherited]

Get inclusive right border of bounding box.

Returns:
Value

Definition at line 120 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00120 { return  1.0; }

Here is the caller graph for this function:

virtual double mpLayer::GetMinY (  )  [inline, virtual, inherited]

Get inclusive bottom border of bounding box.

Returns:
Value

Definition at line 125 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00125 { return -1.0; }

Here is the caller graph for this function:

virtual double mpLayer::GetMaxY (  )  [inline, virtual, inherited]

Get inclusive top border of bounding box.

Returns:
Value

Definition at line 130 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00130 { return  1.0; }

Here is the caller graph for this function:

wxString mpLayer::GetName (  )  const [inline, inherited]

Get layer name.

Returns:
Name

Definition at line 170 of file mathplot.h.

00170 { return m_name; }

const wxFont& mpLayer::GetFont (  )  const [inline, inherited]

Get font set for this layer.

Returns:
Font

Definition at line 175 of file mathplot.h.

00175 { return m_font; }

const wxPen& mpLayer::GetPen (  )  const [inline, inherited]

Get pen set for this layer.

Returns:
Pen

Definition at line 180 of file mathplot.h.

00180 { return m_pen;  }

void mpLayer::SetName ( wxString  name  )  [inline, inherited]

Set layer name

Parameters:
name Name, will be copied to internal class member

Definition at line 185 of file mathplot.h.

Referenced by mpFXY::mpFXY(), mpFY::mpFY(), mpScaleX::mpScaleX(), and mpScaleY::mpScaleY().

00185 { m_name = name; }

Here is the caller graph for this function:

void mpLayer::SetFont ( wxFont &  font  )  [inline, inherited]

Set layer font

Parameters:
font Font, will be copied to internal class member

Definition at line 190 of file mathplot.h.

Referenced by mpScaleX::mpScaleX(), and mpScaleY::mpScaleY().

00190 { m_font = font; }

Here is the caller graph for this function:

void mpLayer::SetPen ( wxPen &  pen  )  [inline, inherited]

Set layer pen

Parameters:
pen Pen, will be copied to internal class member

Definition at line 195 of file mathplot.h.

Referenced by HistogramWidget::drawHistogram(), Histogram::drawHistogram(), HistogramWidget::drawTransferenceFunction(), mpScaleX::mpScaleX(), mpScaleY::mpScaleY(), pPlotterWindow::onChangeColor(), pPlotterWindow::onLoad(), and pPlotterWindow::onStartDrawing().

00195 { m_pen  = pen;  }

Here is the caller graph for this function:

int mpLayer::GetYTranslated ( double  sizey,
double  y 
) [inline, inherited]

Get the translation of the Y coordinate acoording to the new orientation of the axis du to the problem identified in MACOS with the funtion 'SetAxisOrientation'

Definition at line 201 of file mathplot.h.

Referenced by pPlotterLayer::draw(), pPlotterLayer::drawFunction(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterScaleY::Plot(), pPlotterScaleX::Plot(), pPlotterLayer::Plot(), and mpScaleY::Plot().

00201                                                   {
00202                 return -y+sizey;
00203         }

Here is the caller graph for this function:


Member Data Documentation

pLogicalFunction* pGraphicalFunction::logicFunction [private]

Represents the logical function asociated to this graphical function.

Definition at line 826 of file pGraphicalFunction.h.

Referenced by AddNewPoint(), AddPoint(), addSplinesPoints(), changePoint(), DeletePoint(), deletePointAt(), getBefore(), getDirection(), getEndX(), getEndY(), getIndexOf(), getMaxX(), getMaxY(), getMinX(), getMinY(), GetPointAt(), GetPoints(), getSizePoints(), GetSplinePoint(), getStartX(), getStartY(), getX_RealValues(), getY_RealValues(), initializeSplineVectors(), load(), Rewind(), save(), setEndX(), setEndY(), setMaxX(), setMaxY(), setMinShowed(), setMinX(), setMinY(), setOffsetX(), setOffsetY(), setScales(), setScaleX(), setScaleY(), setStartX(), setStartY(), setType(), setUp(), setValidPointRange(), validPointOnFunction(), and zooming().

bool pGraphicalFunction::showPointsF [private]

If the function has to showpoints

Definition at line 830 of file pGraphicalFunction.h.

Referenced by getShowPoints(), ifShowPoints(), and SetShowPoints().

double pGraphicalFunction::_startX [private]

Is the initial discrete point on x axis of the drawed function.

Definition at line 835 of file pGraphicalFunction.h.

Referenced by setStartX().

double pGraphicalFunction::_startY [private]

Is the initial discrete point on y axis of the drawed function.

Definition at line 839 of file pGraphicalFunction.h.

Referenced by setStartY().

double pGraphicalFunction::_endX [private]

Is the last discrete point on x axis of the drawed function.

Definition at line 843 of file pGraphicalFunction.h.

Referenced by setEndX().

double pGraphicalFunction::_endY [private]

Is the last discrete point on y axis of the drawed function.

Definition at line 847 of file pGraphicalFunction.h.

Referenced by setEndY().

double pGraphicalFunction::_scaleX [private]

Is the x-scale percentage according to the context device.

Definition at line 851 of file pGraphicalFunction.h.

Referenced by getScales(), getScaleX(), setOffsets(), setScaleX(), and zooming().

double pGraphicalFunction::_scaleY [private]

Is the y-scale percentage according to the context device.

Definition at line 855 of file pGraphicalFunction.h.

Referenced by getScales(), getScaleY(), setOffsets(), setScaleY(), and zooming().

double pGraphicalFunction::_minX [private]

Is the minimun x-real value reacheable by the function.

Definition at line 859 of file pGraphicalFunction.h.

Referenced by setMinX().

double pGraphicalFunction::_minY [private]

Is the minimun y-real value reacheable by the function.

Definition at line 863 of file pGraphicalFunction.h.

Referenced by setMinY().

double pGraphicalFunction::_maxX [private]

Is the maximun x-real value reacheable by the function.

Definition at line 867 of file pGraphicalFunction.h.

Referenced by setMaxX().

double pGraphicalFunction::_maxY [private]

Is the maximun y-real value reacheable by the function.

Definition at line 871 of file pGraphicalFunction.h.

Referenced by setMaxY().

double pGraphicalFunction::_offsetX [private]

Is the logical x-offset of the drawed function.

Definition at line 875 of file pGraphicalFunction.h.

Referenced by getOffsets(), getOffsetX(), setMinShowed(), setOffsets(), setOffsetX(), and zooming().

double pGraphicalFunction::_offsetY [private]

Is the logical y-offset of the drawed function.

Definition at line 879 of file pGraphicalFunction.h.

Referenced by getOffsets(), getOffsetY(), setMinShowed(), setOffsets(), setOffsetY(), and zooming().

int pGraphicalFunction::_type [private]

Is the way of how points are going to be connected. It could be smooth, line.

Definition at line 883 of file pGraphicalFunction.h.

Referenced by getType(), setType(), and vGetType().

wxList pGraphicalFunction::realPoints [private]

The list of the function points

Definition at line 887 of file pGraphicalFunction.h.

std::vector<pColorPoint *> pGraphicalFunction::f_colorPoints [private]

Definition at line 891 of file pGraphicalFunction.h.

Referenced by getColorPoints(), and setColorPoints().

wxNode* pGraphicalFunction::node [private]

node of the realPoints where are we

Definition at line 896 of file pGraphicalFunction.h.

Referenced by addSplinesPoints(), getBefore(), GetNextXY(), Rewind(), and setMinShowed().

int pGraphicalFunction::validPointRange [private]

Number that determines the radius range for the valid area the point (sensible radius). Default value 5.

Definition at line 900 of file pGraphicalFunction.h.

Referenced by getValidPointRange(), and setValidPointRange().

bool pGraphicalFunction::drawing [private]

Indicates if the user is drawing the function

Definition at line 905 of file pGraphicalFunction.h.

Referenced by GetDrawing(), getDrawing(), and SetDrawing().

wxPoint pGraphicalFunction::mousePoint [private]

this is for the graphical function Mouse Point

Definition at line 911 of file pGraphicalFunction.h.

Referenced by getMousePoint(), and SetMousePoint().

int pGraphicalFunction::screenX [private]

The size of the screen in X

Definition at line 916 of file pGraphicalFunction.h.

Referenced by getScreens(), getScreenX(), setScales(), setScreens(), and setScreenX().

int pGraphicalFunction::screenY [private]

The size of the screen in Y

Definition at line 921 of file pGraphicalFunction.h.

Referenced by getScreens(), getScreenY(), setScales(), setScreens(), and setScreenY().

bool pGraphicalFunction::ifActual [private]

if is the actual

Definition at line 925 of file pGraphicalFunction.h.

Referenced by getActual(), getIfActual(), and setActual().

int pGraphicalFunction::scaleWay [private]

the way we scale DEFECT_SCALE 1 MAX_SCALE 2 USER_SCALE 3

Definition at line 934 of file pGraphicalFunction.h.

Referenced by getScaleWay(), and setScaleWay().

bool pGraphicalFunction::fromWindow [private]

if the function comes from window

Definition at line 939 of file pGraphicalFunction.h.

Referenced by AddNewPoint(), AddPoint(), changePoint(), DeletePoint(), deletePointAt(), getFromWindow(), getFromWindowV(), and setFromWindow().

float pGraphicalFunction::factorZoom [private]

factorZoom

Definition at line 943 of file pGraphicalFunction.h.

Referenced by getFactorZoom(), setFactorZoom(), and setScales().

bool pGraphicalFunction::editable [private]

The function is editable

Definition at line 947 of file pGraphicalFunction.h.

Referenced by getEditable(), and setEditable().

bool pGraphicalFunction::zoomIn [private]

if the user did a zoom in/out

Definition at line 951 of file pGraphicalFunction.h.

Referenced by getZoomB(), setZoomIn(), and zooming().

pFunctionPoint* pGraphicalFunction::initialDrawingPoint [private]

initial drawing point

Definition at line 955 of file pGraphicalFunction.h.

Referenced by getInitialDrawPoint(), setInitialDrawPoint(), and zooming().

pFunctionPoint* pGraphicalFunction::finalDrawingPoint [private]

final drawing point

Definition at line 959 of file pGraphicalFunction.h.

Referenced by getFinallDrawPoint(), setFinalDrawPoint(), and zooming().

int pGraphicalFunction::minShowedX [private]

Minimum point showed to the user (zoom)X

Definition at line 964 of file pGraphicalFunction.h.

Referenced by getMinXShowed(), setMinShowedX(), setOffsets(), and setScales().

int pGraphicalFunction::maxShowedX [private]

Maximum point showed to the user (zoom)X

Definition at line 969 of file pGraphicalFunction.h.

Referenced by getMaxXShowed(), setMaxShowedX(), and setScales().

int pGraphicalFunction::minShowedY [private]

Minimum point showed to the user (zoom)Y

Definition at line 974 of file pGraphicalFunction.h.

Referenced by getMinYShowed(), setMinShowedY(), setOffsets(), and setScales().

int pGraphicalFunction::maxShowedY [private]

Maximum point showed to the user (zoom)X

Definition at line 979 of file pGraphicalFunction.h.

Referenced by getMaxYShowed(), setMaxShowedY(), and setScales().

std::vector<double> pGraphicalFunction::xSpline [private]

Definition at line 985 of file pGraphicalFunction.h.

Referenced by clearSplineVectors(), getXSpline(), and initializeSplineVectors().

std::vector<double> pGraphicalFunction::ySpline [private]

Definition at line 987 of file pGraphicalFunction.h.

Referenced by clearSplineVectors(), getYSpline(), and initializeSplineVectors().

vtkKochanekSpline* pGraphicalFunction::xKSpline [private]

Definition at line 992 of file pGraphicalFunction.h.

Referenced by addSplinesPoints(), GetSplinePoint(), and initializeSplines().

vtkKochanekSpline* pGraphicalFunction::yKSpline [private]

Definition at line 994 of file pGraphicalFunction.h.

Referenced by addSplinesPoints(), GetSplinePoint(), and initializeSplines().

int pGraphicalFunction::offsetPixelX [private]

offset in pixels where the user has clicked before changing the scale

Definition at line 1001 of file pGraphicalFunction.h.

Referenced by getOffsetPixelsX(), getOffsetPixelsXv(), setOffsetPixelX(), and setOffsets().

int pGraphicalFunction::offsetPixelY [private]

Definition at line 1002 of file pGraphicalFunction.h.

Referenced by getOffsetPixelsY(), getOffsetPixelsYv(), setOffsetPixelY(), and setOffsets().

int pGraphicalFunction::mType [private]

Definition at line 1009 of file pGraphicalFunction.h.

Referenced by getmType(), and setmType().

int pGraphicalFunction::xTraslation [private]

Definition at line 1014 of file pGraphicalFunction.h.

Referenced by getXTraslation(), and setXTraslation().

int pPlotterLayer::m_flags [protected, inherited]

Holds label alignment.

Definition at line 224 of file pPlotterLayer.h.

wxList pPlotterLayer::points [protected, inherited]

Definition at line 231 of file pPlotterLayer.h.

Referenced by pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), and pPlotterLayer::drawPoints().

double pPlotterLayer::scaleX [protected, inherited]

Definition at line 235 of file pPlotterLayer.h.

Referenced by pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterScaleX::Plot(), pPlotterLayer::Plot(), and setScales().

double pPlotterLayer::scaleY [protected, inherited]

Definition at line 239 of file pPlotterLayer.h.

Referenced by pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterScaleY::Plot(), pPlotterLayer::Plot(), and setScales().

int pPlotterLayer::offsetX [protected, inherited]

offset X

Definition at line 244 of file pPlotterLayer.h.

Referenced by pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterScaleX::Plot(), and pPlotterLayer::Plot().

int pPlotterLayer::offsetY [protected, inherited]

offset Y

Definition at line 249 of file pPlotterLayer.h.

Referenced by pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), getOffsets(), pPlotterScaleY::Plot(), and pPlotterLayer::Plot().

wxFont mpLayer::m_font [protected, inherited]

Layer's font.

Definition at line 206 of file mathplot.h.

Referenced by pPlotterScaleY::Plot(), pPlotterScaleX::Plot(), mpScaleY::Plot(), mpScaleX::Plot(), mpFXY::Plot(), mpFY::Plot(), and mpFX::Plot().

wxPen mpLayer::m_pen [protected, inherited]

Layer's pen.

Definition at line 207 of file mathplot.h.

Referenced by pPlotterScaleY::Plot(), pPlotterScaleX::Plot(), pPlotterLayer::Plot(), mpScaleY::Plot(), mpScaleX::Plot(), mpFXY::Plot(), mpFY::Plot(), and mpFX::Plot().

wxString mpLayer::m_name [protected, inherited]

Layer's name.

Definition at line 208 of file mathplot.h.

Referenced by mpScaleY::Plot(), mpScaleX::Plot(), mpFXY::Plot(), mpFY::Plot(), and mpFX::Plot().


The documentation for this class was generated from the following files:
Generated on Wed Jul 29 16:36:05 2009 for creaMaracasVisu_lib by  doxygen 1.5.3