VTK  9.4.20250413
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28
29VTK_ABI_NAMESPACE_BEGIN
31
34{
35public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
43
49
52 vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
54
60 vtkIdType AddPoint(double* newPos) override;
61
67 vtkIdType RemovePoint(double* pos) override;
68
69protected:
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
84private:
86 void operator=(const vtkPiecewiseControlPointsItem&) = delete;
87};
88
89VTK_ABI_NAMESPACE_END
90#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:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_MARSHALAUTO