VTK  9.2.6
vtkPiecewiseControlPointsItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPiecewiseControlPointsItem.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
34 #ifndef vtkPiecewiseControlPointsItem_h
35 #define vtkPiecewiseControlPointsItem_h
36 
37 #include "vtkChartsCoreModule.h" // For export macro
38 #include "vtkControlPointsItem.h"
39 
41 
42 class VTKCHARTSCORE_EXPORT vtkPiecewiseControlPointsItem : public vtkControlPointsItem
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
52 
56  virtual void SetPiecewiseFunction(vtkPiecewiseFunction* function);
58 
61  vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
63 
69  vtkIdType AddPoint(double* newPos) override;
70 
76  vtkIdType RemovePoint(double* pos) override;
77 
78 protected:
81 
82  void emitEvent(unsigned long event, void* params = nullptr) override;
83 
85 
86  vtkIdType GetNumberOfPoints() const override;
87  void GetControlPoint(vtkIdType index, double* point) const override;
88  void SetControlPoint(vtkIdType index, double* point) override;
89  void EditPoint(float tX, float tY) override;
90 
92 
93 private:
95  void operator=(const vtkPiecewiseControlPointsItem&) = delete;
96 };
97 
98 #endif
virtual void GetControlPoint(vtkIdType index, double *point) const =0
Returns the x and y coordinates as well as the midpoint and sharpness of the control point correspond...
virtual void EditPoint(float vtkNotUsed(tX), float vtkNotUsed(tY))
Defines a 1D piecewise function.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
virtual vtkMTimeType GetControlPointsMTime()=0
Must be reimplemented by subclasses to calculate the points to draw.
Abstract class for control points items.
int vtkIdType
Definition: vtkType.h:332
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void emitEvent(unsigned long event, void *params=nullptr)=0
Control points for vtkPiecewiseFunction.
virtual vtkIdType RemovePoint(double *pos)=0
Remove a point of the function.
virtual void SetControlPoint(vtkIdType index, double *point)=0
Sets the x and y coordinates as well as the midpoint and sharpness of the control point corresponding...
virtual vtkIdType AddPoint(double *newPos)=0
Add a point to the function.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkIdType GetNumberOfPoints() const =0
Returns the total number of points.