VTK  9.1.0
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=========================================================================*/
28#ifndef vtkOrientedGlyphContourRepresentation_h
29#define vtkOrientedGlyphContourRepresentation_h
30
32#include "vtkInteractionWidgetsModule.h" // For export macro
33
34class vtkProperty;
35class vtkActor;
37class vtkPolyData;
38class vtkGlyph3D;
39class vtkPoints;
40
41class VTKINTERACTIONWIDGETS_EXPORT vtkOrientedGlyphContourRepresentation
43{
44public:
49
51
55 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
64 void SetCursorShape(vtkPolyData* cursorShape);
67
69
77
79
83 vtkGetObjectMacro(Property, vtkProperty);
85
87
91 vtkGetObjectMacro(ActiveProperty, vtkProperty);
93
95
98 vtkGetObjectMacro(LinesProperty, vtkProperty);
100
102
107 void SetRenderer(vtkRenderer* ren) override;
108 void BuildRepresentation() override;
109 void StartWidgetInteraction(double eventPos[2]) override;
110 void WidgetInteraction(double eventPos[2]) override;
111 int ComputeInteractionState(int X, int Y, int modified = 0) override;
113
115
120 int RenderOverlay(vtkViewport* viewport) override;
121 int RenderOpaqueGeometry(vtkViewport* viewport) override;
125
130
132
138 vtkSetMacro(AlwaysOnTop, vtkTypeBool);
139 vtkGetMacro(AlwaysOnTop, vtkTypeBool);
140 vtkBooleanMacro(AlwaysOnTop, vtkTypeBool);
142
147 void SetLineColor(double r, double g, double b);
148
154
158 double* GetBounds() override;
159
160protected:
163
164 // Render the cursor
177
185
189
190 // Support picking
191 double LastPickPosition[3];
192 double LastEventPosition[2];
193
194 // Methods to manipulate the cursor
195 void Translate(double eventPos[2]);
196 void Scale(double eventPos[2]);
197 void ShiftContour(double eventPos[2]);
198 void ScaleContour(double eventPos[2]);
199
200 void ComputeCentroid(double* ioCentroid);
201
202 // Properties used to control the appearance of selected objects and
203 // the manipulator in general.
208
209 // Distance between where the mouse event happens and where the
210 // widget is focused - maintain this distance during interaction.
211 double InteractionOffset[2];
212
214
215 void BuildLines() override;
216
217private:
219 void operator=(const vtkOrientedGlyphContourRepresentation&) = delete;
220};
221
222#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
represent the vtkContourWidget
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:107
a simple class to control print indentation
Definition: vtkIndent.h:34
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:34
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
an ordered list of Props
represent surface properties of a geometric object
Definition: vtkProperty.h:62
abstract specification for renderers
Definition: vtkRenderer.h:73
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69