VTK  9.3.0
vtkPointHandleRepresentation2D.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
30#ifndef vtkPointHandleRepresentation2D_h
31#define vtkPointHandleRepresentation2D_h
32
34#include "vtkInteractionWidgetsModule.h" // For export macro
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkProperty2D;
38class vtkActor2D;
39class vtkCoordinate;
41class vtkPolyData;
42class vtkGlyph2D;
43class vtkPoints;
45class vtkPointPlacer;
46
47class VTKINTERACTIONWIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
48{
49public:
54
56
60 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
66
71 void SetCursorShape(vtkPolyData* cursorShape);
74
80 void SetDisplayPosition(double xyz[3]) override;
81
83
88 vtkGetObjectMacro(Property, vtkProperty2D);
89 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
91
93
98 double* GetBounds() VTK_SIZEHINT(6) override;
99 void BuildRepresentation() override;
100 void StartWidgetInteraction(double eventPos[2]) override;
101 void WidgetInteraction(double eventPos[2]) override;
102 int ComputeInteractionState(int X, int Y, int modify = 0) override;
104
106
109 void ShallowCopy(vtkProp* prop) override;
110 void DeepCopy(vtkProp* prop) override;
111 void GetActors2D(vtkPropCollection*) override;
112 void ReleaseGraphicsResources(vtkWindow*) override;
113 int RenderOverlay(vtkViewport* viewport) override;
115
116 void Highlight(int highlight) override;
117
124 void SetPointPlacer(vtkPointPlacer*) override;
125
132 void SetVisibility(vtkTypeBool visible) override;
133
134protected:
137
138 // Render the cursor
140 vtkCoordinate* MapperCoordinate;
142 vtkGlyph2D* Glypher;
143 vtkPolyData* CursorShape;
144 vtkPolyData* FocalData;
145 vtkPoints* FocalPoint;
146
147 // Support picking
148 double LastPickPosition[3];
149 double LastEventPosition[2];
150
151 // Methods to manipulate the cursor
152 void Translate(const double* eventPos) override;
153 void Scale(const double eventPos[2]);
154
155 // Properties used to control the appearance of selected objects and
156 // the manipulator in general.
157 vtkProperty2D* Property;
158 vtkProperty2D* SelectedProperty;
159 void CreateDefaultProperties();
160
161 // The size of the hot spot.
162 int WaitingForMotion;
163 int WaitCount;
164
165private:
167 void operator=(const vtkPointHandleRepresentation2D&) = delete;
168};
169
170VTK_ABI_NAMESPACE_END
171#endif
a actor that draws 2D data
Definition vtkActor2D.h:44
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:41
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:38
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:38
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:89
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:52
represent surface properties of a 2D image
abstract specification for Viewports
Definition vtkViewport.h:54
window superclass for vtkRenderWindow
Definition vtkWindow.h:34
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)