VTK  9.4.20251007
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
20
21#ifndef vtkPointHandleRepresentation2D_h
22#define vtkPointHandleRepresentation2D_h
23
25#include "vtkInteractionWidgetsModule.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkProperty2D;
29class vtkActor2D;
30class vtkCoordinate;
32class vtkPolyData;
33class vtkGlyph2D;
34class vtkPoints;
36class vtkPointPlacer;
37
38class VTKINTERACTIONWIDGETS_EXPORT vtkPointHandleRepresentation2D : public vtkHandleRepresentation
39{
40public:
45
47
51 void PrintSelf(ostream& os, vtkIndent indent) override;
53
55
57
62 void SetCursorShape(vtkPolyData* cursorShape);
65
71 void SetDisplayPosition(double xyz[3]) override;
72
74
79 vtkGetObjectMacro(Property, vtkProperty2D);
80 vtkGetObjectMacro(SelectedProperty, vtkProperty2D);
82
84
89 double* GetBounds() VTK_SIZEHINT(6) override;
90 void BuildRepresentation() override;
91 void StartWidgetInteraction(double eventPos[2]) override;
92 void WidgetInteraction(double eventPos[2]) override;
93 int ComputeInteractionState(int X, int Y, int modify = 0) override;
95
97
100 void ShallowCopy(vtkProp* prop) override;
101 void DeepCopy(vtkProp* prop) override;
104 int RenderOverlay(vtkViewport* viewport) override;
106
107 void Highlight(int highlight) override;
108
116
123 void SetVisibility(vtkTypeBool visible) override;
124
125protected:
128
129 // Render the cursor
137
138 // Support picking
141
142 // Methods to manipulate the cursor
143 void Translate(const double* eventPos) override;
144 void Scale(const double eventPos[2]);
145
146 // Properties used to control the appearance of selected objects and
147 // the manipulator in general.
151
152 // The size of the hot spot.
155
156private:
158 void operator=(const vtkPointHandleRepresentation2D&) = delete;
159};
160
161VTK_ABI_NAMESPACE_END
162#endif
a actor that draws 2D data
Definition vtkActor2D.h:36
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:32
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:29
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 WidgetInteraction(double eventPos[2]) override
Subclasses of vtkPointHandleRepresentation2D must implement these methods.
void ReleaseGraphicsResources(vtkWindow *) override
Methods to make this class behave as a vtkProp.
void SetSelectedProperty(vtkProperty2D *)
Set/Get the handle properties when unselected and selected.
void Translate(const double *eventPos) override
Translates world position by vector v projected on the constraint axis if any.
vtkPolyData * GetCursorShape()
Specify the cursor shape with an instance of vtkPolyData.
void GetActors2D(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
void ShallowCopy(vtkProp *prop) override
Methods to make this class behave as a vtkProp.
void SetCursorShape(vtkPolyData *cursorShape)
Specify the cursor shape with an instance of vtkPolyData.
int ComputeInteractionState(int X, int Y, int modify=0) override
Subclasses of vtkPointHandleRepresentation2D must implement these methods.
void SetProperty(vtkProperty2D *)
Set/Get the handle properties when unselected and selected.
double * GetBounds() override
Subclasses of vtkPointHandleRepresentation2D must implement these methods.
void Scale(const double eventPos[2])
void SetVisibility(vtkTypeBool visible) override
Override to ensure that the internal actor's visibility is consistent with this representation's visi...
void BuildRepresentation() override
Subclasses of vtkPointHandleRepresentation2D must implement these methods.
void SetPointPlacer(vtkPointPlacer *) override
Override the superclass implementation.
void Highlight(int highlight) override
void DeepCopy(vtkProp *prop) override
Methods to make this class behave as a vtkProp.
int RenderOverlay(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
void StartWidgetInteraction(double eventPos[2]) 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:30
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
an ordered list of Props
represent surface properties of a 2D image
abstract specification for Viewports
Definition vtkViewport.h:46
window superclass for vtkRenderWindow
Definition vtkWindow.h:29
int vtkTypeBool
Definition vtkABI.h:64
#define vtkPolyDataAlgorithm
#define VTK_SIZEHINT(...)