VTK  9.3.20240328
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
Abstract class for control points items.
a simple class to control print indentation
Definition: vtkIndent.h:108
Control points for vtkPiecewiseFunction.
vtkIdType RemovePoint(double *pos) override
Remove a point of the function.
void GetControlPoint(vtkIdType index, double *point) const override
Returns the x and y coordinates as well as the midpoint and sharpness of the control point correspond...
virtual void SetPiecewiseFunction(vtkPiecewiseFunction *function)
Set the piecewise function to draw its points.
void SetControlPoint(vtkIdType index, double *point) override
Sets the x and y coordinates as well as the midpoint and sharpness of the control point corresponding...
static vtkPiecewiseControlPointsItem * New()
Creates a piecewise control points object.
vtkIdType GetNumberOfPoints() const override
Returns the total number of points.
vtkMTimeType GetControlPointsMTime() override
Must be reimplemented by subclasses to calculate the points to draw.
~vtkPiecewiseControlPointsItem() override
vtkIdType AddPoint(double *newPos) override
Add a point to the function.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void emitEvent(unsigned long event, void *params=nullptr) override
void EditPoint(float tX, float tY) override
Defines a 1D piecewise function.
@ point
Definition: vtkX3D.h:236
@ index
Definition: vtkX3D.h:246
int vtkIdType
Definition: vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270