VTK  9.3.20240424
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
27
28VTK_ABI_NAMESPACE_BEGIN
30
31class VTKCHARTSCORE_EXPORT vtkPiecewiseControlPointsItem : public vtkControlPointsItem
32{
33public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
41
47
50 vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
52
58 vtkIdType AddPoint(double* newPos) override;
59
65 vtkIdType RemovePoint(double* pos) override;
66
67protected:
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
82private:
84 void operator=(const vtkPiecewiseControlPointsItem&) = delete;
85};
86
87VTK_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...
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.
static vtkPiecewiseControlPointsItem * New()
Creates a piecewise control points object.
void emitEvent(unsigned long event, void *params=nullptr) override
void EditPoint(float tX, float tY) override
Defines a 1D piecewise function.
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270