VTK
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
32 #include "vtkControlPointsItem.h"
33 
35 
36 class VTKCHARTSCORE_EXPORT vtkPiecewiseControlPointsItem: public vtkControlPointsItem
37 {
38 public:
40  void PrintSelf(ostream &os, vtkIndent indent) override;
41 
46 
50  virtual void SetPiecewiseFunction(vtkPiecewiseFunction* function);
52 
55  vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction);
57 
63  vtkIdType AddPoint(double* newPos) override;
64 
70  vtkIdType RemovePoint(double* pos) override;
71 
73 
78  vtkSetMacro(StrokeMode, bool);
80 
81 protected:
84 
85  void emitEvent(unsigned long event, void* params = nullptr) override;
86 
88 
89  vtkIdType GetNumberOfPoints()const override;
90  void GetControlPoint(vtkIdType index, double *point)const override;
91  void SetControlPoint(vtkIdType index, double *point) override;
92  void EditPoint(float tX, float tY) override;
93 
95 
96 private:
98  void operator=(const vtkPiecewiseControlPointsItem &) = delete;
99 };
100 
101 #endif
vtkControlPointsItem::GetControlPoint
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...
vtkControlPointsItem::GetNumberOfPoints
virtual vtkIdType GetNumberOfPoints() const =0
Returns the total number of points.
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkControlPointsItem::SetControlPoint
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...
vtkControlPointsItem::AddPoint
virtual vtkIdType AddPoint(double *newPos)=0
Add a point to the function.
vtkControlPointsItem
Abstract class for control points items.
Definition: vtkControlPointsItem.h:42
vtkControlPointsItem::emitEvent
virtual void emitEvent(unsigned long event, void *params=nullptr)=0
vtkX3D::point
Definition: vtkX3D.h:236
vtkControlPointsItem::EditPoint
virtual void EditPoint(float vtkNotUsed(tX), float vtkNotUsed(tY))
vtkPiecewiseControlPointsItem
Control points for vtkPiecewiseFunction.
Definition: vtkPiecewiseControlPointsItem.h:36
vtkControlPointsItem::RemovePoint
virtual vtkIdType RemovePoint(double *pos)=0
Remove a point of the function.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:45
vtkPiecewiseControlPointsItem::PiecewiseFunction
vtkPiecewiseFunction * PiecewiseFunction
Definition: vtkPiecewiseControlPointsItem.h:94
vtkControlPointsItem::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::index
Definition: vtkX3D.h:246
vtkControlPointsItem::GetControlPointsMTime
virtual vtkMTimeType GetControlPointsMTime()=0
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkControlPointsItem.h