VTK  9.7.1
vtk3DCursorRepresentation.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
23 #ifndef vtk3DCursorRepresentation_h
24 #define vtk3DCursorRepresentation_h
25 
26 #include "vtkActor.h" // For vtkActor
27 #include "vtkHardwarePicker.h" // For vtkHardwarePicker
28 #include "vtkInteractionWidgetsModule.h" // For export macro
29 #include "vtkNew.h" // For vtkNew
30 #include "vtkSmartPointer.h" // For vtkSmartPointer
32 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33 
34 #include <memory> // for unique_ptr
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 
38 class vtkViewport;
39 
40 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtk3DCursorRepresentation
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
52  void BuildRepresentation() override;
53 
57  void WidgetInteraction(double newEventPos[2]) override;
58 
60 
63  void ReleaseGraphicsResources(vtkWindow*) override;
64  int RenderOpaqueGeometry(vtkViewport* viewport) override;
66 
68  {
69  CROSS_SHAPE = 0,
70  SPHERE_SHAPE = 1,
71  CUSTOM_SHAPE = 2
72  };
73 
75 
81  void SetCursorShape(int shape);
82  vtkGetMacro(Shape, int);
84 
86 
90  void SetCustomCursor(vtkActor* customCursor);
91  vtkGetSmartPointerMacro(CustomCursor, vtkActor);
93 
94 protected:
96  ~vtk3DCursorRepresentation() override;
97 
98 private:
100  void operator=(const vtk3DCursorRepresentation&) = delete;
101 
102  struct vtkInternals;
103  std::unique_ptr<vtkInternals> Internals;
104 
105  vtkSmartPointer<vtkActor> CustomCursor;
106  int Shape = CROSS_SHAPE;
107 };
108 
109 VTK_ABI_NAMESPACE_END
110 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
abstract specification for Viewports
Definition: vtkViewport.h:46
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
Representation of the vtk3DCursorWidget.
a simple class to control print indentation
Definition: vtkIndent.h:28
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual void WidgetInteraction(double newEventPos[2])
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...