VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28 
29 VTK_ABI_NAMESPACE_BEGIN
31 
33  : public vtkControlPointsItem
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43 
47  virtual void SetPiecewiseFunction(vtkPiecewiseFunction* function);
49 
52  vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
54 
60  vtkIdType AddPoint(double* newPos) override;
61 
67  vtkIdType RemovePoint(double* pos) override;
68 
69 protected:
72 
73  void emitEvent(unsigned long event, void* params = nullptr) override;
74 
76 
77  vtkIdType GetNumberOfPoints() const override;
78  void GetControlPoint(vtkIdType index, double* point) const override;
79  void SetControlPoint(vtkIdType index, double* point) override;
80  void EditPoint(float tX, float tY) override;
81 
83 
84 private:
86  void operator=(const vtkPiecewiseControlPointsItem&) = delete;
87 };
88 
89 VTK_ABI_NAMESPACE_END
90 #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...
Defines a 1D piecewise function.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual vtkMTimeType GetControlPointsMTime()=0
Must be reimplemented by subclasses to calculate the points to draw.
virtual void EditPoint(float tX, float tY)
Abstract class for control points items.
int vtkIdType
Definition: vtkType.h:363
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.
#define VTK_MARSHALAUTO
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.