VTK  9.2.6
vtkOrientedGlyphContourRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOrientedGlyphContourRepresentation.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
40#ifndef vtkOrientedGlyphContourRepresentation_h
41#define vtkOrientedGlyphContourRepresentation_h
42
44#include "vtkInteractionWidgetsModule.h" // For export macro
45
46class vtkProperty;
47class vtkActor;
49class vtkPolyData;
50class vtkGlyph3D;
51class vtkPoints;
52
53class VTKINTERACTIONWIDGETS_EXPORT vtkOrientedGlyphContourRepresentation
55{
56public:
61
63
67 void PrintSelf(ostream& os, vtkIndent indent) override;
69
71
76 void SetCursorShape(vtkPolyData* cursorShape);
79
81
89
91
95 vtkGetObjectMacro(Property, vtkProperty);
97
99
103 vtkGetObjectMacro(ActiveProperty, vtkProperty);
105
107
110 vtkGetObjectMacro(LinesProperty, vtkProperty);
112
114
119 void SetRenderer(vtkRenderer* ren) override;
120 void BuildRepresentation() override;
121 void StartWidgetInteraction(double eventPos[2]) override;
122 void WidgetInteraction(double eventPos[2]) override;
123 int ComputeInteractionState(int X, int Y, int modified = 0) override;
125
127
132 int RenderOverlay(vtkViewport* viewport) override;
133 int RenderOpaqueGeometry(vtkViewport* viewport) override;
137
142
144
150 vtkSetMacro(AlwaysOnTop, vtkTypeBool);
151 vtkGetMacro(AlwaysOnTop, vtkTypeBool);
152 vtkBooleanMacro(AlwaysOnTop, vtkTypeBool);
154
159 void SetLineColor(double r, double g, double b);
160
166
170 double* GetBounds() override;
171
172protected:
175
176 // Render the cursor
189
197
201
202 // Support picking
203 double LastPickPosition[3];
204 double LastEventPosition[2];
205
206 // Methods to manipulate the cursor
207 void Translate(double eventPos[2]);
208 void Scale(double eventPos[2]);
209 void ShiftContour(double eventPos[2]);
210 void ScaleContour(double eventPos[2]);
211
212 void ComputeCentroid(double* ioCentroid);
213
214 // Properties used to control the appearance of selected objects and
215 // the manipulator in general.
220
221 // Distance between where the mouse event happens and where the
222 // widget is focused - maintain this distance during interaction.
223 double InteractionOffset[2];
224
226
227 void BuildLines() override;
228
229private:
231 void operator=(const vtkOrientedGlyphContourRepresentation&) = delete;
232};
233
234#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:61
represent the vtkContourWidget
copy oriented and scaled glyph geometry to every input point
Definition vtkGlyph3D.h:122
a simple class to control print indentation
Definition vtkIndent.h:49
Default representation for the contour widget.
void ReleaseGraphicsResources(vtkWindow *) override
Methods to make this class behave as a vtkProp.
int ComputeInteractionState(int X, int Y, int modified=0) override
Subclasses of vtkOrientedGlyphContourRepresentation must implement these methods.
void BuildRepresentation() override
Subclasses of vtkOrientedGlyphContourRepresentation must implement these methods.
void ShiftContour(double eventPos[2])
vtkPolyData * GetActiveCursorShape()
Specify the shape of the cursor (handle) when it is active.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods to make this class behave as a vtkProp.
void ScaleContour(double eventPos[2])
void SetActiveCursorShape(vtkPolyData *activeShape)
Specify the shape of the cursor (handle) when it is active.
void SetRenderer(vtkRenderer *ren) override
Subclasses of vtkOrientedGlyphContourRepresentation must implement these methods.
int RenderOverlay(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkPolyData * GetContourRepresentationAsPolyData() override
Get the points in this contour as a vtkPolyData.
void SetShowSelectedNodes(vtkTypeBool) override
A flag to indicate whether to show the Selected nodes Default is to set it to false.
static vtkOrientedGlyphContourRepresentation * New()
Instantiate this class.
void WidgetInteraction(double eventPos[2]) override
Subclasses of vtkOrientedGlyphContourRepresentation must implement these methods.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
void ComputeCentroid(double *ioCentroid)
void Scale(double eventPos[2])
void Translate(double eventPos[2])
void SetCursorShape(vtkPolyData *cursorShape)
Specify the cursor shape.
vtkPolyData * GetCursorShape()
Specify the cursor shape.
void GetActors(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
void StartWidgetInteraction(double eventPos[2]) override
Subclasses of vtkOrientedGlyphContourRepresentation must implement these methods.
void SetLineColor(double r, double g, double b)
Convenience method to set the line color.
double * GetBounds() override
Return the bounds of the representation.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
represent and manipulate 3D points
Definition vtkPoints.h:49
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
an ordered list of Props
represent surface properties of a geometric object
Definition vtkProperty.h:77
abstract specification for renderers
Definition vtkRenderer.h:82
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:69