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=========================================================================*/
42#ifndef vtkPointHandleRepresentation2D_h
43#define vtkPointHandleRepresentation2D_h
44
46#include "vtkInteractionWidgetsModule.h" // For export macro
47
48class vtkProperty2D;
49class vtkActor2D;
50class vtkCoordinate;
52class vtkPolyData;
53class vtkGlyph2D;
54class vtkPoints;
56class vtkPointPlacer;
57
58class VTKINTERACTIONWIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
59{
60public:
65
67
71 void PrintSelf(ostream& os, vtkIndent indent) override;
73
75
77
82 void SetCursorShape(vtkPolyData* cursorShape);
85
91 void SetDisplayPosition(double xyz[3]) override;
92
94
99 vtkGetObjectMacro(Property, vtkProperty2D);
100 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
102
104
109 double* GetBounds() VTK_SIZEHINT(6) override;
110 void BuildRepresentation() override;
111 void StartWidgetInteraction(double eventPos[2]) override;
112 void WidgetInteraction(double eventPos[2]) override;
113 int ComputeInteractionState(int X, int Y, int modify = 0) override;
115
117
120 void ShallowCopy(vtkProp* prop) override;
121 void DeepCopy(vtkProp* prop) override;
122 void GetActors2D(vtkPropCollection*) override;
123 void ReleaseGraphicsResources(vtkWindow*) override;
124 int RenderOverlay(vtkViewport* viewport) override;
126
127 void Highlight(int highlight) override;
128
135 void SetPointPlacer(vtkPointPlacer*) override;
136
143 void SetVisibility(vtkTypeBool visible) override;
144
145protected:
148
149 // Render the cursor
151 vtkCoordinate* MapperCoordinate;
153 vtkGlyph2D* Glypher;
154 vtkPolyData* CursorShape;
155 vtkPolyData* FocalData;
156 vtkPoints* FocalPoint;
157
158 // Support picking
159 double LastPickPosition[3];
160 double LastEventPosition[2];
161
162 // Methods to manipulate the cursor
163 void Translate(const double* eventPos) override;
164 void Scale(const double eventPos[2]);
165
166 // Properties used to control the appearance of selected objects and
167 // the manipulator in general.
168 vtkProperty2D* Property;
169 vtkProperty2D* SelectedProperty;
170 void CreateDefaultProperties();
171
172 // The size of the hot spot.
173 int WaitingForMotion;
174 int WaitCount;
175
176private:
178 void operator=(const vtkPointHandleRepresentation2D&) = delete;
179};
180
181#endif
a actor that draws 2D data
Definition vtkActor2D.h:55
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:52
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:49
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:49
Superclass for algorithms that produce only polydata as output.
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
represent surface properties of a 2D image
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_SIZEHINT(...)