VTK  9.3.1
vtkPiecewiseControlPointsItem.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
22 #ifndef vtkPiecewiseControlPointsItem_h
23 #define vtkPiecewiseControlPointsItem_h
24 
25 #include "vtkChartsCoreModule.h" // For export macro
26 #include "vtkControlPointsItem.h"
27 
28 VTK_ABI_NAMESPACE_BEGIN
30 
31 class VTKCHARTSCORE_EXPORT vtkPiecewiseControlPointsItem : public vtkControlPointsItem
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
41 
45  virtual void SetPiecewiseFunction(vtkPiecewiseFunction* function);
47 
50  vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
52 
58  vtkIdType AddPoint(double* newPos) override;
59 
65  vtkIdType RemovePoint(double* pos) override;
66 
67 protected:
70 
71  void emitEvent(unsigned long event, void* params = nullptr) override;
72 
74 
75  vtkIdType GetNumberOfPoints() const override;
76  void GetControlPoint(vtkIdType index, double* point) const override;
77  void SetControlPoint(vtkIdType index, double* point) override;
78  void EditPoint(float tX, float tY) override;
79 
81 
82 private:
84  void operator=(const vtkPiecewiseControlPointsItem&) = delete;
85 };
86 
87 VTK_ABI_NAMESPACE_END
88 #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:270
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:315
a simple class to control print indentation
Definition: vtkIndent.h:28
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.