VTK
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 =========================================================================*/
30 #ifndef vtkOrientedGlyphContourRepresentation_h
31 #define vtkOrientedGlyphContourRepresentation_h
32 
33 #include "vtkInteractionWidgetsModule.h" // For export macro
35 
36 class vtkProperty;
37 class vtkActor;
38 class vtkPolyDataMapper;
39 class vtkPolyData;
40 class vtkGlyph3D;
41 class vtkPoints;
42 
44 {
45 public:
48 
50 
52  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
59  void SetCursorShape(vtkPolyData *cursorShape);
60  vtkPolyData *GetCursorShape();
62 
64 
67  void SetActiveCursorShape(vtkPolyData *activeShape);
68  vtkPolyData *GetActiveCursorShape();
70 
72 
74  vtkGetObjectMacro(Property,vtkProperty);
76 
78 
80  vtkGetObjectMacro(ActiveProperty,vtkProperty);
82 
84 
85  vtkGetObjectMacro(LinesProperty,vtkProperty);
87 
89 
92  virtual void SetRenderer(vtkRenderer *ren);
93  virtual void BuildRepresentation();
94  virtual void StartWidgetInteraction(double eventPos[2]);
95  virtual void WidgetInteraction(double eventPos[2]);
96  virtual int ComputeInteractionState(int X, int Y, int modified=0);
98 
100 
101  virtual void GetActors(vtkPropCollection *);
102  virtual void ReleaseGraphicsResources(vtkWindow *);
103  virtual int RenderOverlay(vtkViewport *viewport);
104  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
105  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
106  virtual int HasTranslucentPolygonalGeometry();
108 
111 
113 
117  vtkSetMacro( AlwaysOnTop, int );
118  vtkGetMacro( AlwaysOnTop, int );
119  vtkBooleanMacro( AlwaysOnTop, int );
121 
124  void SetLineColor(double r, double g, double b);
125 
128  virtual void SetShowSelectedNodes(int);
129 
131  virtual double *GetBounds();
132 
133 protected:
136 
137  // Render the cursor
150 
157  void CreateSelectedNodesRepresentation();
158 
162 
163  // Support picking
164  double LastPickPosition[3];
165  double LastEventPosition[2];
166 
167  // Methods to manipulate the cursor
168  void Translate(double eventPos[2]);
169  void Scale(double eventPos[2]);
170  void ShiftContour(double eventPos[2]);
171  void ScaleContour(double eventPos[2]);
172 
173  void ComputeCentroid(double* ioCentroid);
174 
175  // Properties used to control the appearance of selected objects and
176  // the manipulator in general.
180  void CreateDefaultProperties();
181 
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 
188 
189  virtual void BuildLines();
190 
191 private:
193  void operator=(const vtkOrientedGlyphContourRepresentation&); //Not implemented
194 };
195 
196 #endif
void PrintSelf(ostream &os, vtkIndent indent)
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
virtual void WidgetInteraction(double e[2])=0
abstract specification for Viewports
Definition: vtkViewport.h:46
represent surface properties of a geometric object
Definition: vtkProperty.h:63
Default representation for the contour widget.
virtual vtkPolyData * GetContourRepresentationAsPolyData()=0
virtual void SetRenderer(vtkRenderer *ren)
abstract specification for renderers
Definition: vtkRenderer.h:63
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
represent the vtkContourWidget
virtual int RenderOpaqueGeometry(vtkViewport *viewport)=0
virtual void StartWidgetInteraction(double e[2])=0
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)=0
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RenderOverlay(vtkViewport *viewport)=0
virtual void BuildLines()=0
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:110
virtual void SetShowSelectedNodes(int)
virtual void GetActors(vtkPropCollection *)
map vtkPolyData to graphics primitives
virtual int HasTranslucentPolygonalGeometry()=0
virtual int ComputeInteractionState(int X, int Y, int modified=0)=0
virtual void BuildRepresentation()=0
static vtkObject * New()
virtual void ReleaseGraphicsResources(vtkWindow *w)=0
represent and manipulate 3D points
Definition: vtkPoints.h:38