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=========================================================================*/
66#ifndef vtkPointHandleRepresentation2D_h
67#define vtkPointHandleRepresentation2D_h
68
70#include "vtkInteractionWidgetsModule.h" // For export macro
71
72class vtkProperty2D;
73class vtkActor2D;
74class vtkCoordinate;
76class vtkPolyData;
77class vtkGlyph2D;
78class vtkPoints;
80class vtkPointPlacer;
81
82class VTKINTERACTIONWIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
83{
84public:
89
91
95 void PrintSelf(ostream& os, vtkIndent indent) override;
97
99
101
106 void SetCursorShape(vtkPolyData* cursorShape);
109
115 void SetDisplayPosition(double xyz[3]) override;
116
118
123 vtkGetObjectMacro(Property, vtkProperty2D);
124 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
126
128
133 double* GetBounds() VTK_SIZEHINT(6) override;
134 void BuildRepresentation() override;
135 void StartWidgetInteraction(double eventPos[2]) override;
136 void WidgetInteraction(double eventPos[2]) override;
137 int ComputeInteractionState(int X, int Y, int modify = 0) override;
139
141
144 void ShallowCopy(vtkProp* prop) override;
145 void DeepCopy(vtkProp* prop) override;
146 void GetActors2D(vtkPropCollection*) override;
147 void ReleaseGraphicsResources(vtkWindow*) override;
148 int RenderOverlay(vtkViewport* viewport) override;
150
151 void Highlight(int highlight) override;
152
159 void SetPointPlacer(vtkPointPlacer*) override;
160
167 void SetVisibility(vtkTypeBool visible) override;
168
169protected:
172
173 // Render the cursor
175 vtkCoordinate* MapperCoordinate;
177 vtkGlyph2D* Glypher;
178 vtkPolyData* CursorShape;
179 vtkPolyData* FocalData;
180 vtkPoints* FocalPoint;
181
182 // Support picking
183 double LastPickPosition[3];
184 double LastEventPosition[2];
185
186 // Methods to manipulate the cursor
187 void Translate(const double* eventPos) override;
188 void Scale(const double eventPos[2]);
189
190 // Properties used to control the appearance of selected objects and
191 // the manipulator in general.
192 vtkProperty2D* Property;
193 vtkProperty2D* SelectedProperty;
194 void CreateDefaultProperties();
195
196 // The size of the hot spot.
197 int WaitingForMotion;
198 int WaitCount;
199
200private:
202 void operator=(const vtkPointHandleRepresentation2D&) = delete;
203};
204
205#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
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:69
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:113
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:143
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:195
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
represent surface properties of a 2D image
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)