20 #ifndef _vctPlot2DBase_h
21 #define _vctPlot2DBase_h
60 friend class vctPlot2DVTK;
62 Signal(
const std::string & name,
size_t numberOfPoints,
size_t pointDimension = 2);
76 vctDouble2 GetPointAt(
size_t index)
throw (std::runtime_error);
81 void SetPointAt(
size_t index,
const vctDouble2 & point)
throw (std::runtime_error);
88 void SetArrayAt(
size_t index,
const double * pointArray,
size_t arraySize,
size_t pointDimension = 2) throw (std::runtime_error);
95 bool PrependArray(const
double * pointArray,
size_t arraySize,
size_t pointDimension = 2) throw (std::runtime_error);
102 bool AppendArray(const
double * pointArray,
size_t arraySize,
size_t pointDimension = 2) throw (std::runtime_error);
104 void Freeze(
bool freeze);
105 bool GetFreeze(
void) const;
110 void ComputeDataRangeX(
double & min,
double & max,
bool assumesDataSorted = false) const;
111 void ComputeDataRangeY(
double & min,
double & max) const;
116 void CISST_DEPRECATED GetNumberOfPoints(
size_t & numberOfPoints,
size_t & bufferSize) const;
119 size_t GetSize(
void) const;
122 size_t GetNumberOfPoints(
void) const;
124 void SetColor(const
vctDouble3 & colorInRange0To1);
129 void SetSize(
size_t numberOfPoints);
131 bool IsVisible(
void) const;
132 void SetVisible(const
bool visible);
137 void Resize(
size_t numberOfPoints,
bool trimOlder = true);
142 const std::
string & GetName(
void) const;
168 friend class vctPlot2DVTK;
170 VerticalLine(
const std::string & name,
const double x = 0.0);
173 void SetX(
const double x);
174 void SetColor(
const vctDouble3 & colorInRange0To1);
188 friend class vctPlot2DVTK;
199 Scale(
const std::string & name,
size_t pointDimension = 2);
202 const std::string & GetName(
void)
const;
205 bool RemoveSignal(
const std::string & name);
206 bool RemoveSignal(
const Signal * signal);
214 void SetColor(
const vctDouble3 & colorInRange0To1);
216 void Freeze(
bool freeze);
217 bool GetFreeze(
void)
const;
219 void ContinuousUpdate(
void);
223 void SetContinuousFitX(
bool fit);
224 void SetContinuousFitY(
bool fit);
225 void SetContinuousExpandY(
bool expand);
230 return ContinuousFitX;
233 return ContinuousFitY;
236 return ContinuousExpandY;
239 return this->ViewingRangeX;
242 return this->ViewingRangeY;
253 bool ComputeDataRangeX(
double & min,
double & max,
bool assumesDataSorted =
false)
const;
254 bool ComputeDataRangeY(
double & min,
double & max);
267 void AutoFitX(
double padding = 0.0);
268 void FitX(
double min,
double max,
double padding = 0.0);
269 void AutoFitY(
double padding = 0.1);
270 void AutoExpandY(
double padding = 0.1);
271 void FitY(
double min,
double max,
double padding = 0.1);
313 bool RemoveScale(
const std::string & name);
327 void SetNumberOfPoints(
size_t numberOfPoints);
352 void AutoFitX(
double padding = 0.0);
353 void FitX(
double min,
double max,
double padding = 0.0);
354 void AutoFitY(
double padding = 0.1);
355 void FitY(
double min,
double max,
double padding = 0.1);
362 void Freeze(
bool freeze);
365 bool GetFreeze(
void)
const;
369 void SetContinuousFitX(
bool fit);
370 void SetContinuousFitY(
bool fit);
371 void SetContinuousExpandY(
bool expand);
375 bool GetContinuousFitX(
void)
const;
378 bool GetContinuousFitY(
void)
const;
381 bool GetContinuousExpandY(
void)
const;
386 return this->ViewingRangeX;
389 return this->ViewingRangeY;
394 void SetBackgroundColor(
const vctDouble3 & colorInRange0To1);
400 virtual void RenderInitialize(
void) = 0;
401 virtual void RenderResize(
double width,
double height) = 0;
402 virtual void Render(
void) = 0;
420 void ContinuousUpdate(
void);
426 #endif // _vctPlot2DBase_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
bool Visible
Definition: vctPlot2DBase.h:179
A vector object of dynamic size.
Definition: vctDynamicVector.h:127
Typedef for dynamic vectors.
Definition: vctPlot2DBase.h:184
vctDouble2 ScaleValue
Definition: vctPlot2DBase.h:288
int CISST_EXPORT Resize(svlSampleImage *src_img, unsigned int src_videoch, svlSampleImage *dst_img, unsigned int dst_videoch, bool interpolation)
#define CISST_DEPRECATED
Definition: cmnPortability.h:310
bool GetContinuousFitY(void) const
Definition: vctPlot2DBase.h:232
bool ContinuousFitY
Definition: vctPlot2DBase.h:279
An implementation of the ``abstract'' vctFixedSizeVectorBase.
Definition: vctFixedSizeVectorRef.h:46
Definition: vctPlot2DBase.h:164
double ExpandYMin
Definition: vctPlot2DBase.h:281
const vctDouble2 & GetViewingRangeY(void) const
Definition: vctPlot2DBase.h:388
vctDouble3 BackgroundColor
Definition: vctPlot2DBase.h:423
const SignalsType & GetSignals(void) const
Definition: vctPlot2DBase.h:208
vctFixedSizeVector< double, 2 > vctDouble2
Definition: vctFixedSizeVectorTypes.h:40
Typedef for fixed size vectors.
std::map< std::string, VerticalLine * > VerticalLinesType
Definition: vctPlot2DBase.h:196
vctDouble2 Viewport
Definition: vctPlot2DBase.h:284
bool ContinuousExpandY
Definition: vctPlot2DBase.h:280
const vctDouble2 & GetViewingRangeY(void)
Definition: vctPlot2DBase.h:241
vctDouble3 Color
Definition: vctPlot2DBase.h:180
ScalesType Scales
Definition: vctPlot2DBase.h:302
vctDouble2 Translation
Definition: vctPlot2DBase.h:287
Declaration of vctDynamicVector.
std::map< std::string, Signal * > SignalsType
Definition: vctPlot2DBase.h:192
std::map< std::string, Scale * > ScalesType
Definition: vctPlot2DBase.h:301
size_t PointSize
Definition: vctPlot2DBase.h:408
const vctDouble2 & GetViewingRangeX(void)
Definition: vctPlot2DBase.h:238
bool GetContinuousFitX(void) const
Definition: vctPlot2DBase.h:229
VerticalLinesType VerticalLines
Definition: vctPlot2DBase.h:197
SignalsType Signals
Definition: vctPlot2DBase.h:193
double LineWidth
Definition: vctPlot2DBase.h:181
Definition: vctPlot2DOpenGL.h:29
double X
Definition: vctPlot2DBase.h:178
vctDouble2 Viewport
Definition: vctPlot2DBase.h:414
bool GetContinuousExpandY(void) const
Definition: vctPlot2DBase.h:235
vctDouble2 ViewingRangeY
Definition: vctPlot2DBase.h:286
Macros to export the symbols of cisstVector (in a Dll).
ScalesType & GetScales(void)
Definition: vctPlot2DBase.h:319
bool ContinuousFitX
Definition: vctPlot2DBase.h:278
Definition: vctPlot2DBase.h:55
Definition: vctPlot2DBase.h:44
const vctDouble2 & GetViewingRangeX(void) const
Definition: vctPlot2DBase.h:385
size_t NumberOfPoints
Definition: vctPlot2DBase.h:411
vctDouble2 ViewingRangeY
Definition: vctPlot2DBase.h:416
std::string Name
Definition: vctPlot2DBase.h:177