VTK  9.1.0
vtkPointHandleRepresentation2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPointHandleRepresentation2D.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=========================================================================*/
36#ifndef vtkPointHandleRepresentation2D_h
37#define vtkPointHandleRepresentation2D_h
38
40#include "vtkInteractionWidgetsModule.h" // For export macro
41
42class vtkProperty2D;
43class vtkActor2D;
44class vtkCoordinate;
46class vtkPolyData;
47class vtkGlyph2D;
48class vtkPoints;
50class vtkPointPlacer;
51
52class VTKINTERACTIONWIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
53{
54public:
59
61
65 void PrintSelf(ostream& os, vtkIndent indent) override;
67
69
71
76 void SetCursorShape(vtkPolyData* cursorShape);
79
85 void SetDisplayPosition(double xyz[3]) override;
86
88
93 vtkGetObjectMacro(Property, vtkProperty2D);
94 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
96
98
103 double* GetBounds() VTK_SIZEHINT(6) override;
104 void BuildRepresentation() override;
105 void StartWidgetInteraction(double eventPos[2]) override;
106 void WidgetInteraction(double eventPos[2]) override;
107 int ComputeInteractionState(int X, int Y, int modify = 0) override;
109
111
114 void ShallowCopy(vtkProp* prop) override;
115 void DeepCopy(vtkProp* prop) override;
116 void GetActors2D(vtkPropCollection*) override;
117 void ReleaseGraphicsResources(vtkWindow*) override;
118 int RenderOverlay(vtkViewport* viewport) override;
120
121 void Highlight(int highlight) override;
122
129 void SetPointPlacer(vtkPointPlacer*) override;
130
137 void SetVisibility(vtkTypeBool visible) override;
138
139protected:
142
143 // Render the cursor
145 vtkCoordinate* MapperCoordinate;
147 vtkGlyph2D* Glypher;
148 vtkPolyData* CursorShape;
149 vtkPolyData* FocalData;
150 vtkPoints* FocalPoint;
151
152 // Support picking
153 double LastPickPosition[3];
154 double LastEventPosition[2];
155
156 // Methods to manipulate the cursor
157 void Translate(const double* eventPos) override;
158 void Scale(const double eventPos[2]);
159
160 // Properties used to control the appearance of selected objects and
161 // the manipulator in general.
162 vtkProperty2D* Property;
163 vtkProperty2D* SelectedProperty;
164 void CreateDefaultProperties();
165
166 // The size of the hot spot.
167 int WaitingForMotion;
168 int WaitCount;
169
170private:
172 void operator=(const vtkPointHandleRepresentation2D&) = delete;
173};
174
175#endif
a actor that draws 2D data
Definition: vtkActor2D.h:49
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:86
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:49
abstract class for representing widget handles
virtual void Translate(const double *p1, const double *p2)
Translates world position by vector p1p2 projected on the constraint axis if any.
a simple class to control print indentation
Definition: vtkIndent.h:43
represent the position of a point in display coordinates
void SetDisplayPosition(double xyz[3]) override
Set/Get the position of the point in display coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
void SetSelectedProperty(vtkProperty2D *)
Set/Get the handle properties when unselected and selected.
vtkPolyData * GetCursorShape()
Specify the cursor shape with an instance of vtkPolyData.
void SetCursorShape(vtkPolyData *cursorShape)
Specify the cursor shape with an instance of vtkPolyData.
void SetProperty(vtkProperty2D *)
Set/Get the handle properties when unselected and selected.
double * GetBounds() override
Subclasses of vtkPointHandleRepresentation2D must implement these methods.
static vtkPointHandleRepresentation2D * New()
Instantiate this class.
Abstract interface to translate 2D display positions to world coordinates.
represent and manipulate 3D points
Definition: vtkPoints.h:43
Superclass for algorithms that produce only polydata as output.
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:57
represent surface properties of a 2D image
Definition: vtkProperty2D.h:47
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)