34#ifndef VP_PLOT_GRAPH_H
35#define VP_PLOT_GRAPH_H
37#include <visp3/core/vpConfig.h>
39#ifndef DOXYGEN_SHOULD_SKIP_THIS
41#include <visp3/core/vpColor.h>
42#include <visp3/core/vpImage.h>
44#include <visp3/core/vpMouseButton.h>
45#include <visp3/gui/vpPlotCurve.h>
47#include <visp3/core/vpHomogeneousMatrix.h>
48#include <visp3/core/vpRect.h>
50#include <visp3/core/vpCameraParameters.h>
51#include <visp3/core/vpPoint.h>
53#if defined(VISP_HAVE_DISPLAY)
76 unsigned int curveNbr;
77 vpPlotCurve *curveList;
78 bool scaleInitialized;
91 vpImagePoint dTopLeft;
97 vpImagePoint dTopLeft3D;
103 vpCameraParameters
cam;
104 vpHomogeneousMatrix
cMo;
105 vpHomogeneousMatrix cMf;
127 vpImagePoint old_iPr;
128 vpImagePoint old_iPz;
140 unsigned int gridThickness;
171 virtual ~vpPlotGraph();
173 bool check3Dline(vpImagePoint &iP1, vpImagePoint &iP2);
174 bool check3Dpoint(vpImagePoint &iP);
175 void clearGraphZone(vpImage<unsigned char> &I);
176 void computeGraphParameters();
177 void computeGraphParameters3D();
179 void initGraph(
unsigned int nbCurve);
180 void initSize(vpImagePoint topLeft,
unsigned int width,
unsigned int height,
unsigned int margei,
181 unsigned int margej);
182 void initScale(vpImage<unsigned char> &I,
double xmin,
double xmax,
int nbDivx,
double ymin,
double ymax,
int nbDivy,
184 void initScale(vpImage<unsigned char> &I,
double xmin,
double xmax,
int nbDivx,
double ymin,
double ymax,
int nbDivy,
185 double zmin,
double zmax,
int nbDivz,
bool gx,
bool gy);
187 void displayGrid(vpImage<unsigned char> &I);
188 void displayUnit(vpImage<unsigned char> &I);
189 void displayTitle(vpImage<unsigned char> &I);
190 void displayLegend(vpImage<unsigned char> &I);
191 void displayGrid3D(vpImage<unsigned char> &I);
195 bool getPixelValue(vpImage<unsigned char> &I, vpImagePoint &iP);
200 void plot(vpImage<unsigned char> &I,
unsigned int curveNb,
double x,
double y);
202 void replot(vpImage<unsigned char> &I);
203 void replot3D(vpImage<unsigned char> &I);
205 void rescalex(
unsigned int side,
double extremity);
206 void rescaley(
unsigned int side,
double extremity);
207 void rescalez(
unsigned int side,
double extremity);
209 void resetPointList(
unsigned int curveNum);
211 void setCurveColor(
unsigned int curveNum,
const vpColor &color);
212 void setCurveThickness(
unsigned int curveNum,
unsigned int thickness);
213 void setGridThickness(
unsigned int thickness) { this->gridThickness =
thickness; }
214 void setLegend(
unsigned int curveNum,
const std::string &legend);
215 void setTitle(
const std::string &title);
216 void setUnitX(
const std::string &unitx);
217 void setUnitY(
const std::string &unity);
218 void setUnitZ(
const std::string &unitz);