VTK  9.3.20240423
vtkOrientedGlyphFocalPlaneContourRepresentation.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
19#ifndef vtkOrientedGlyphFocalPlaneContourRepresentation_h
20#define vtkOrientedGlyphFocalPlaneContourRepresentation_h
21
23#include "vtkInteractionWidgetsModule.h" // For export macro
24
25VTK_ABI_NAMESPACE_BEGIN
26class vtkProperty2D;
27class vtkActor2D;
29class vtkPolyData;
30class vtkGlyph2D;
31class vtkPoints;
32class vtkPolyData;
33
34class VTKINTERACTIONWIDGETS_EXPORT vtkOrientedGlyphFocalPlaneContourRepresentation
36{
37public:
42
44
48 void PrintSelf(ostream& os, vtkIndent indent) override;
50
52
57 void SetCursorShape(vtkPolyData* cursorShape);
60
62
70
72
76 vtkGetObjectMacro(Property, vtkProperty2D);
78
80
84 vtkGetObjectMacro(ActiveProperty, vtkProperty2D);
86
88
91 vtkGetObjectMacro(LinesProperty, vtkProperty2D);
93
95
100 void SetRenderer(vtkRenderer* ren) override;
101 void BuildRepresentation() override;
102 void StartWidgetInteraction(double eventPos[2]) override;
103 void WidgetInteraction(double eventPos[2]) override;
104 int ComputeInteractionState(int X, int Y, int modified = 0) override;
106
108
113 int RenderOverlay(vtkViewport* viewport) override;
114 int RenderOpaqueGeometry(vtkViewport* viewport) override;
118
123
132
133protected:
136
137 // Render the cursor
150
151 // The polydata represents the contour in display coordinates.
155
156 // The polydata represents the contour in world coordinates. It is updated
157 // (kept in sync with Lines) every time the GetContourRepresentationAsPolyData()
158 // method is called.
160
161 // Support picking
162 double LastPickPosition[3];
163 double LastEventPosition[2];
164
165 // Methods to manipulate the cursor
166 void Translate(double eventPos[2]);
167 void Scale(double eventPos[2]);
168 void ShiftContour(double eventPos[2]);
169 void ScaleContour(double eventPos[2]);
170
171 void ComputeCentroid(double* ioCentroid);
172
173 // Properties used to control the appearance of selected objects and
174 // the manipulator in general.
178
180
182
183 // Distance between where the mouse event happens and where the
184 // widget is focused - maintain this distance during interaction.
185 double InteractionOffset[2];
186
187 void BuildLines() override;
188
189private:
192 void operator=(const vtkOrientedGlyphFocalPlaneContourRepresentation&) = delete;
193};
194
195VTK_ABI_NAMESPACE_END
196#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
represent a contour drawn on the focal plane.
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition vtkGlyph2D.h:61
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
void WidgetInteraction(double eventPos[2]) override
Subclasses of vtkOrientedGlyphFocalPlaneContourRepresentation must implement these methods.
vtkPolyData * GetContourRepresentationAsPolyData() override
Get the points in this contour as a vtkPolyData.
void GetActors2D(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
int RenderOverlay(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
vtkPolyData * GetCursorShape()
Specify the cursor shape.
void StartWidgetInteraction(double eventPos[2]) override
Subclasses of vtkOrientedGlyphFocalPlaneContourRepresentation must implement these methods.
void SetCursorShape(vtkPolyData *cursorShape)
Specify the cursor shape.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
int ComputeInteractionState(int X, int Y, int modified=0) override
Subclasses of vtkOrientedGlyphFocalPlaneContourRepresentation must implement these methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
void ReleaseGraphicsResources(vtkWindow *) override
Methods to make this class behave as a vtkProp.
void SetRenderer(vtkRenderer *ren) override
Subclasses of vtkOrientedGlyphFocalPlaneContourRepresentation must implement these methods.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
static vtkOrientedGlyphFocalPlaneContourRepresentation * New()
Instantiate this class.
void BuildRepresentation() override
Subclasses of vtkOrientedGlyphFocalPlaneContourRepresentation must implement these methods.
vtkMatrix4x4 * GetContourPlaneDirectionCosines(const double origin[3])
Direction cosines of the plane on which the contour lies on in world coordinates.
void SetActiveCursorShape(vtkPolyData *activeShape)
Specify the shape of the cursor (handle) when it is active.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods to make this class behave as a vtkProp.
vtkPolyData * GetActiveCursorShape()
Specify the shape of the cursor (handle) when it is active.
represent and manipulate 3D points
Definition vtkPoints.h:139
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
an ordered list of Props
represent surface properties of a 2D image
abstract specification for renderers
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64