VTK  9.5.20250709
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
60#ifndef vtkPointHandleRepresentation2D_h
61#define vtkPointHandleRepresentation2D_h
62
64#include "vtkInteractionWidgetsModule.h" // For export macro
65#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
66
67VTK_ABI_NAMESPACE_BEGIN
68class vtkProperty2D;
69class vtkActor2D;
70class vtkCoordinate;
72class vtkPolyData;
73class vtkGlyph2D;
74class vtkPoints;
76class vtkPointPlacer;
77
78class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkPointHandleRepresentation2D
80{
81public:
86
88
92 void PrintSelf(ostream& os, vtkIndent indent) override;
94
96
98
103 void SetCursorShape(vtkPolyData* cursorShape);
106
112 void SetDisplayPosition(double xyz[3]) override;
113
115
120 vtkGetObjectMacro(Property, vtkProperty2D);
121 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
123
125
130 double* GetBounds() VTK_SIZEHINT(6) override;
131 void BuildRepresentation() override;
132 void StartWidgetInteraction(double eventPos[2]) override;
133 void WidgetInteraction(double eventPos[2]) override;
134 int ComputeInteractionState(int X, int Y, int modify = 0) override;
136
138
141 void ShallowCopy(vtkProp* prop) override;
142 void DeepCopy(vtkProp* prop) override;
143 void GetActors2D(vtkPropCollection*) override;
144 void ReleaseGraphicsResources(vtkWindow*) override;
145 int RenderOverlay(vtkViewport* viewport) override;
147
148 void Highlight(int highlight) override;
149
156 void SetPointPlacer(vtkPointPlacer*) override;
157
164 void SetVisibility(vtkTypeBool visible) override;
165
166protected:
169
170 // Render the cursor
172 vtkCoordinate* MapperCoordinate;
174 vtkGlyph2D* Glypher;
175 vtkPolyData* CursorShape;
176 vtkPolyData* FocalData;
177 vtkPoints* FocalPoint;
178
179 // Support picking
180 double LastPickPosition[3];
181 double LastEventPosition[2];
182
183 // Methods to manipulate the cursor
184 void Translate(const double* eventPos) override;
185 void Scale(const double eventPos[2]);
186
187 // Properties used to control the appearance of selected objects and
188 // the manipulator in general.
189 vtkProperty2D* Property;
190 vtkProperty2D* SelectedProperty;
191 void CreateDefaultProperties();
192
193 // The size of the hot spot.
194 int WaitingForMotion;
195 int WaitCount;
196
197private:
199 void operator=(const vtkPointHandleRepresentation2D&) = delete;
200};
201
202VTK_ABI_NAMESPACE_END
203#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
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:61
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:108
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:139
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:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO