VTK
vtkCompositeControlPointsItem.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCompositeControlPointsItem.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
33#ifndef vtkCompositeControlPointsItem_h
34#define vtkCompositeControlPointsItem_h
35
36#include "vtkChartsCoreModule.h" // For export macro
38
41
42class VTKCHARTSCORE_EXPORT vtkCompositeControlPointsItem:
44{
45public:
47 virtual void PrintSelf(ostream &os, vtkIndent indent);
48
53
58
60
64 vtkGetObjectMacro(OpacityFunction, vtkPiecewiseFunction);
66
68 ColorPointsFunction = 1,
69 OpacityPointsFunction = 2,
70 ColorAndOpacityPointsFunction = 3
71 };
73
85 vtkSetMacro(PointsFunction, int);
86 vtkGetMacro(PointsFunction, int);
88
94 virtual vtkIdType AddPoint(double* newPos);
95
101 virtual vtkIdType RemovePoint(double* pos);
102
104
111 vtkSetMacro(UseOpacityPointHandles, bool);
112 vtkGetMacro(UseOpacityPointHandles, bool);
114
116
119 virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
120 virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse);
121 virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
123
124protected:
127
132 virtual bool UsingLogScale();
133
134 virtual void emitEvent(unsigned long event, void* params);
135
137
139 virtual void DrawPoint(vtkContext2D* painter, vtkIdType index);
140 virtual void GetControlPoint(vtkIdType index, double* pos)const;
141 virtual void SetControlPoint(vtkIdType index, double *point);
142 virtual void EditPoint(float tX, float tY);
143 virtual void EditPointCurve(vtkIdType idx);
144
147
152
153private:
155 void operator=(const vtkCompositeControlPointsItem &) VTK_DELETE_FUNCTION;
156};
157
158#endif
Control points for vtkColorTransferFunction.
Defines a transfer function for mapping a property to an RGB color value.
Control points for vtkCompositeFunction.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual vtkIdType RemovePoint(double *pos)
Remove a point of the function.
virtual void DrawPoint(vtkContext2D *painter, vtkIdType index)
virtual void EditPointCurve(vtkIdType idx)
static vtkCompositeControlPointsItem * New()
Creates a piecewise control points object.
virtual void SetColorTransferFunction(vtkColorTransferFunction *function)
Set the color transfer function to draw its points.
virtual void GetControlPoint(vtkIdType index, double *pos) const
Returns the x and y coordinates as well as the midpoint and sharpness of the control point correspond...
vtkPiecewisePointHandleItem * OpacityPointHandle
void SetOpacityFunction(vtkPiecewiseFunction *opacity)
Utility function that calls SetPiecewiseFunction()
virtual void SetControlPoint(vtkIdType index, double *point)
Sets the x and y coordinates as well as the midpoint and sharpness of the control point corresponding...
virtual bool UsingLogScale()
Returns true if control points are to be rendered in log-space.
virtual void EditPoint(float tX, float tY)
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
virtual vtkIdType GetNumberOfPoints() const
Return the number of points in the color transfer function.
virtual vtkMTimeType GetControlPointsMTime()
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
Mouse button double click event.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event.
virtual vtkIdType AddPoint(double *newPos)
Add a point to the function.
virtual void emitEvent(unsigned long event, void *params)
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
data structure to represent mouse events.
a simple class to control print indentation
Definition: vtkIndent.h:40
Defines a 1D piecewise function.
a vtkContextItem that draws handles around a point of a piecewise function
@ point
Definition: vtkX3D.h:236
@ function
Definition: vtkX3D.h:249
@ index
Definition: vtkX3D.h:246
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248