VTK  9.1.0
vtkPiecewiseControlPointsItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPiecewiseControlPointsItem.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
28#ifndef vtkPiecewiseControlPointsItem_h
29#define vtkPiecewiseControlPointsItem_h
30
31#include "vtkChartsCoreModule.h" // For export macro
33
35
36class VTKCHARTSCORE_EXPORT vtkPiecewiseControlPointsItem : public vtkControlPointsItem
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
46
52
55 vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
57
63 vtkIdType AddPoint(double* newPos) override;
64
70 vtkIdType RemovePoint(double* pos) override;
71
72protected:
75
76 void emitEvent(unsigned long event, void* params = nullptr) override;
77
79
80 vtkIdType GetNumberOfPoints() const override;
81 void GetControlPoint(vtkIdType index, double* point) const override;
82 void SetControlPoint(vtkIdType index, double* point) override;
83 void EditPoint(float tX, float tY) override;
84
86
87private:
89 void operator=(const vtkPiecewiseControlPointsItem&) = delete;
90};
91
92#endif
Abstract class for control points items.
a simple class to control print indentation
Definition: vtkIndent.h:113
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.
@ point
Definition: vtkX3D.h:242
@ function
Definition: vtkX3D.h:255
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287