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 
32 #ifndef vtkCompositeControlPointsItem_h
33 #define vtkCompositeControlPointsItem_h
34 
35 #include "vtkChartsCoreModule.h" // For export macro
37 
40 
43 {
44 public:
46  virtual void PrintSelf(ostream &os, vtkIndent indent);
47 
50 
53 
55 
59 
61  ColorPointsFunction = 1,
62  OpacityPointsFunction = 2,
63  ColorAndOpacityPointsFunction = 3
64  };
66 
74  vtkSetMacro(PointsFunction, int);
75  vtkGetMacro(PointsFunction, int);
77 
81  virtual vtkIdType AddPoint(double* newPos);
82 
86  virtual vtkIdType RemovePoint(double* pos);
87 
89 
93  vtkSetMacro(UseOpacityPointHandles, bool);
94  vtkGetMacro(UseOpacityPointHandles, bool);
96 
98 
99  virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
100  virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse);
101  virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
103 
104 protected:
107 
110  virtual bool UsingLogScale();
111 
112  virtual void emitEvent(unsigned long event, void* params);
113 
114  virtual unsigned long int GetControlPointsMTime();
115 
116  virtual vtkIdType GetNumberOfPoints()const;
117  virtual void DrawPoint(vtkContext2D* painter, vtkIdType index);
118  virtual void GetControlPoint(vtkIdType index, double* pos)const;
119  virtual void SetControlPoint(vtkIdType index, double *point);
120  virtual void EditPoint(float tX, float tY);
121  virtual void EditPointCurve(vtkIdType idx);
122 
125 
130 
131 private:
133  void operator=(const vtkCompositeControlPointsItem &); // Not implemented.
134 };
135 
136 #endif
vtkCompositeControlPointsItem::DrawPoint
virtual void DrawPoint(vtkContext2D *painter, vtkIdType index)
vtkChartsCoreModule.h
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:40
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkCompositeControlPointsItem::vtkCompositeControlPointsItem
vtkCompositeControlPointsItem()
vtkCompositeControlPointsItem::GetControlPointsMTime
virtual unsigned long int GetControlPointsMTime()
vtkCompositeControlPointsItem::MergeTransferFunctions
void MergeTransferFunctions()
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCompositeControlPointsItem::SilentMergeTransferFunctions
void SilentMergeTransferFunctions()
vtkCompositeControlPointsItem::~vtkCompositeControlPointsItem
virtual ~vtkCompositeControlPointsItem()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkColorTransferControlPointsItem.h
vtkCompositeControlPointsItem::EditPointCurve
virtual void EditPointCurve(vtkIdType idx)
vtkCompositeControlPointsItem::PointsFunctionType
PointsFunctionType
Definition: vtkCompositeControlPointsItem.h:60
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
vtkCompositeControlPointsItem::RemovePoint
virtual vtkIdType RemovePoint(double *pos)
vtkPiecewisePointHandleItem
a vtkContextItem that draws handles around a point of a piecewise function
Definition: vtkPiecewisePointHandleItem.h:39
vtkColorTransferFunction
Defines a transfer function for mapping a property to an RGB color value.
Definition: vtkColorTransferFunction.h:58
vtkgl::event
struct _cl_event * event
Definition: vtkgl.h:14387
vtkCompositeControlPointsItem::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
vtkCompositeControlPointsItem::PointsFunction
int PointsFunction
Definition: vtkCompositeControlPointsItem.h:126
vtkCompositeControlPointsItem::OpacityFunction
vtkPiecewiseFunction * OpacityFunction
Definition: vtkCompositeControlPointsItem.h:127
vtkCompositeControlPointsItem::UsingLogScale
virtual bool UsingLogScale()
vtkColorTransferControlPointsItem
Control points for vtkColorTransferFunction.
Definition: vtkColorTransferControlPointsItem.h:39
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkgl::params
GLenum const GLfloat * params
Definition: vtkgl.h:11333
vtkCompositeControlPointsItem::emitEvent
virtual void emitEvent(unsigned long event, void *params)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCompositeControlPointsItem::SetControlPoint
virtual void SetControlPoint(vtkIdType index, double *point)
vtkCompositeControlPointsItem::EditPoint
virtual void EditPoint(float tX, float tY)
vtkCompositeControlPointsItem::MouseDoubleClickEvent
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkCompositeControlPointsItem::AddPoint
virtual vtkIdType AddPoint(double *newPos)
vtkCompositeControlPointsItem::SetOpacityFunction
void SetOpacityFunction(vtkPiecewiseFunction *opacity)
vtkCompositeControlPointsItem::OpacityPointHandle
vtkPiecewisePointHandleItem * OpacityPointHandle
Definition: vtkCompositeControlPointsItem.h:128
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:51
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkCompositeControlPointsItem::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkCompositeControlPointsItem::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
VTKCHARTSCORE_EXPORT
#define VTKCHARTSCORE_EXPORT
Definition: vtkChartsCoreModule.h:15
vtkCompositeControlPointsItem::UseOpacityPointHandles
bool UseOpacityPointHandles
Definition: vtkCompositeControlPointsItem.h:129
vtkCompositeControlPointsItem::GetControlPoint
virtual void GetControlPoint(vtkIdType index, double *pos) const
vtkCompositeControlPointsItem::New
static vtkCompositeControlPointsItem * New()
vtkCompositeControlPointsItem
Control points for vtkCompositeFunction.
Definition: vtkCompositeControlPointsItem.h:43
vtkCompositeControlPointsItem::SetColorTransferFunction
virtual void SetColorTransferFunction(vtkColorTransferFunction *function)
vtkCompositeControlPointsItem::GetNumberOfPoints
virtual vtkIdType GetNumberOfPoints() const