VTK  9.2.6
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=========================================================================*/
72#ifndef vtkPointHandleRepresentation2D_h
73#define vtkPointHandleRepresentation2D_h
74
76#include "vtkInteractionWidgetsModule.h" // For export macro
77
78class vtkProperty2D;
79class vtkActor2D;
80class vtkCoordinate;
82class vtkPolyData;
83class vtkGlyph2D;
84class vtkPoints;
86class vtkPointPlacer;
87
88class VTKINTERACTIONWIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
89{
90public:
95
97
101 void PrintSelf(ostream& os, vtkIndent indent) override;
103
105
107
112 void SetCursorShape(vtkPolyData* cursorShape);
115
121 void SetDisplayPosition(double xyz[3]) override;
122
124
129 vtkGetObjectMacro(Property, vtkProperty2D);
130 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
132
134
139 double* GetBounds() VTK_SIZEHINT(6) override;
140 void BuildRepresentation() override;
141 void StartWidgetInteraction(double eventPos[2]) override;
142 void WidgetInteraction(double eventPos[2]) override;
143 int ComputeInteractionState(int X, int Y, int modify = 0) override;
145
147
150 void ShallowCopy(vtkProp* prop) override;
151 void DeepCopy(vtkProp* prop) override;
152 void GetActors2D(vtkPropCollection*) override;
153 void ReleaseGraphicsResources(vtkWindow*) override;
154 int RenderOverlay(vtkViewport* viewport) override;
156
157 void Highlight(int highlight) override;
158
165 void SetPointPlacer(vtkPointPlacer*) override;
166
173 void SetVisibility(vtkTypeBool visible) override;
174
175protected:
178
179 // Render the cursor
181 vtkCoordinate* MapperCoordinate;
183 vtkGlyph2D* Glypher;
184 vtkPolyData* CursorShape;
185 vtkPolyData* FocalData;
186 vtkPoints* FocalPoint;
187
188 // Support picking
189 double LastPickPosition[3];
190 double LastEventPosition[2];
191
192 // Methods to manipulate the cursor
193 void Translate(const double* eventPos) override;
194 void Scale(const double eventPos[2]);
195
196 // Properties used to control the appearance of selected objects and
197 // the manipulator in general.
198 vtkProperty2D* Property;
199 vtkProperty2D* SelectedProperty;
200 void CreateDefaultProperties();
201
202 // The size of the hot spot.
203 int WaitingForMotion;
204 int WaitCount;
205
206private:
208 void operator=(const vtkPointHandleRepresentation2D&) = delete;
209};
210
211#endif
a actor that draws 2D data
Definition: vtkActor2D.h:155
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:72
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:119
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:149
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:200
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
represent surface properties of a 2D image
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)