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 =========================================================================*/
31 #ifndef vtkOrientedGlyphContourRepresentation_h
32 #define vtkOrientedGlyphContourRepresentation_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
36 
37 class vtkProperty;
38 class vtkActor;
39 class vtkPolyDataMapper;
40 class vtkPolyData;
41 class vtkGlyph3D;
42 class vtkPoints;
43 
44 class VTKINTERACTIONWIDGETS_EXPORT vtkOrientedGlyphContourRepresentation : public vtkContourRepresentation
45 {
46 public:
51 
53 
57  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
66  void SetCursorShape(vtkPolyData *cursorShape);
69 
71 
76  void SetActiveCursorShape(vtkPolyData *activeShape);
79 
81 
85  vtkGetObjectMacro(Property,vtkProperty);
87 
89 
93  vtkGetObjectMacro(ActiveProperty,vtkProperty);
95 
97 
100  vtkGetObjectMacro(LinesProperty,vtkProperty);
102 
104 
109  virtual void SetRenderer(vtkRenderer *ren);
110  virtual void BuildRepresentation();
111  virtual void StartWidgetInteraction(double eventPos[2]);
112  virtual void WidgetInteraction(double eventPos[2]);
113  virtual int ComputeInteractionState(int X, int Y, int modified=0);
115 
117 
120  virtual void GetActors(vtkPropCollection *);
122  virtual int RenderOverlay(vtkViewport *viewport);
123  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
127 
132 
134 
140  vtkSetMacro( AlwaysOnTop, int );
141  vtkGetMacro( AlwaysOnTop, int );
142  vtkBooleanMacro( AlwaysOnTop, int );
144 
149  void SetLineColor(double r, double g, double b);
150 
155  virtual void SetShowSelectedNodes(int);
156 
160  virtual double *GetBounds();
161 
162 protected:
165 
166  // Render the cursor
179 
187 
191 
192  // Support picking
193  double LastPickPosition[3];
194  double LastEventPosition[2];
195 
196  // Methods to manipulate the cursor
197  void Translate(double eventPos[2]);
198  void Scale(double eventPos[2]);
199  void ShiftContour(double eventPos[2]);
200  void ScaleContour(double eventPos[2]);
201 
202  void ComputeCentroid(double* ioCentroid);
203 
204  // Properties used to control the appearance of selected objects and
205  // the manipulator in general.
210 
211 
212  // Distance between where the mouse event happens and where the
213  // widget is focused - maintain this distance during interaction.
214  double InteractionOffset[2];
215 
217 
218  virtual void BuildLines();
219 
220 private:
222  void operator=(const vtkOrientedGlyphContourRepresentation&) VTK_DELETE_FUNCTION;
223 };
224 
225 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:43
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkOrientedGlyphContourRepresentation::ActiveProperty
vtkProperty * ActiveProperty
Definition: vtkOrientedGlyphContourRepresentation.h:207
vtkOrientedGlyphContourRepresentation::New
static vtkOrientedGlyphContourRepresentation * New()
Instantiate this class.
vtkOrientedGlyphContourRepresentation::ActiveFocalPoint
vtkPoints * ActiveFocalPoint
Definition: vtkOrientedGlyphContourRepresentation.h:178
vtkOrientedGlyphContourRepresentation::GetContourRepresentationAsPolyData
virtual vtkPolyData * GetContourRepresentationAsPolyData()
Get the points in this contour as a vtkPolyData.
vtkOrientedGlyphContourRepresentation::FocalData
vtkPolyData * FocalData
Definition: vtkOrientedGlyphContourRepresentation.h:175
vtkOrientedGlyphContourRepresentation::SetLineColor
void SetLineColor(double r, double g, double b)
Convenience method to set the line color.
vtkOrientedGlyphContourRepresentation::SelectedNodesData
vtkPolyData * SelectedNodesData
Definition: vtkOrientedGlyphContourRepresentation.h:180
vtkOrientedGlyphContourRepresentation::AlwaysOnTop
int AlwaysOnTop
Definition: vtkOrientedGlyphContourRepresentation.h:216
vtkOrientedGlyphContourRepresentation::SetShowSelectedNodes
virtual void SetShowSelectedNodes(int)
A flag to indicate whether to show the Selected nodes Default is to set it to false.
vtkOrientedGlyphContourRepresentation::LinesProperty
vtkProperty * LinesProperty
Definition: vtkOrientedGlyphContourRepresentation.h:208
vtkOrientedGlyphContourRepresentation::SetRenderer
virtual void SetRenderer(vtkRenderer *ren)
Subclasses of vtkOrientedGlyphContourRepresentation must implement these methods.
vtkOrientedGlyphContourRepresentation::GetCursorShape
vtkPolyData * GetCursorShape()
vtkOrientedGlyphContourRepresentation::Glypher
vtkGlyph3D * Glypher
Definition: vtkOrientedGlyphContourRepresentation.h:169
vtkOrientedGlyphContourRepresentation::CreateDefaultProperties
void CreateDefaultProperties()
vtkContourRepresentation
represent the vtkContourWidget
Definition: vtkContourRepresentation.h:121
vtkOrientedGlyphContourRepresentation::ActiveFocalData
vtkPolyData * ActiveFocalData
Definition: vtkOrientedGlyphContourRepresentation.h:177
vtkOrientedGlyphContourRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modified=0)
vtkOrientedGlyphContourRepresentation::BuildLines
virtual void BuildLines()
vtkOrientedGlyphContourRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkOrientedGlyphContourRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkOrientedGlyphContourRepresentation::SelectedNodesMapper
vtkPolyDataMapper * SelectedNodesMapper
Definition: vtkOrientedGlyphContourRepresentation.h:183
vtkOrientedGlyphContourRepresentation::CreateSelectedNodesRepresentation
void CreateSelectedNodesRepresentation()
vtkOrientedGlyphContourRepresentation::GetBounds
virtual double * GetBounds()
Return the bounds of the representation.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkOrientedGlyphContourRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *viewport)
vtkOrientedGlyphContourRepresentation::SelectedNodesCursorShape
vtkPolyData * SelectedNodesCursorShape
Definition: vtkOrientedGlyphContourRepresentation.h:185
vtkOrientedGlyphContourRepresentation::WidgetInteraction
virtual void WidgetInteraction(double eventPos[2])
vtkOrientedGlyphContourRepresentation::SetActiveCursorShape
void SetActiveCursorShape(vtkPolyData *activeShape)
Specify the shape of the cursor (handle) when it is active.
vtkOrientedGlyphContourRepresentation::Mapper
vtkPolyDataMapper * Mapper
Definition: vtkOrientedGlyphContourRepresentation.h:168
vtkOrientedGlyphContourRepresentation::LinesMapper
vtkPolyDataMapper * LinesMapper
Definition: vtkOrientedGlyphContourRepresentation.h:189
vtkOrientedGlyphContourRepresentation::ActiveActor
vtkActor * ActiveActor
Definition: vtkOrientedGlyphContourRepresentation.h:170
vtkOrientedGlyphContourRepresentation::ComputeCentroid
void ComputeCentroid(double *ioCentroid)
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkOrientedGlyphContourRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Methods required by vtkProp superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkContourRepresentation.h
vtkOrientedGlyphContourRepresentation::Translate
void Translate(double eventPos[2])
vtkOrientedGlyphContourRepresentation::ActiveCursorShape
vtkPolyData * ActiveCursorShape
Definition: vtkOrientedGlyphContourRepresentation.h:174
vtkOrientedGlyphContourRepresentation::LinesActor
vtkActor * LinesActor
Definition: vtkOrientedGlyphContourRepresentation.h:190
vtkOrientedGlyphContourRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
vtkOrientedGlyphContourRepresentation
Default representation for the contour widget.
Definition: vtkOrientedGlyphContourRepresentation.h:45
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkOrientedGlyphContourRepresentation::Property
vtkProperty * Property
Definition: vtkOrientedGlyphContourRepresentation.h:206
vtkGlyph3D
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:112
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkOrientedGlyphContourRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkOrientedGlyphContourRepresentation::Lines
vtkPolyData * Lines
Definition: vtkOrientedGlyphContourRepresentation.h:188
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkOrientedGlyphContourRepresentation::SelectedNodesPoints
vtkPoints * SelectedNodesPoints
Definition: vtkOrientedGlyphContourRepresentation.h:181
vtkOrientedGlyphContourRepresentation::ShiftContour
void ShiftContour(double eventPos[2])
vtkOrientedGlyphContourRepresentation::ActiveMapper
vtkPolyDataMapper * ActiveMapper
Definition: vtkOrientedGlyphContourRepresentation.h:171
vtkOrientedGlyphContourRepresentation::GetActiveCursorShape
vtkPolyData * GetActiveCursorShape()
vtkOrientedGlyphContourRepresentation::ActiveGlypher
vtkGlyph3D * ActiveGlypher
Definition: vtkOrientedGlyphContourRepresentation.h:172
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkOrientedGlyphContourRepresentation::~vtkOrientedGlyphContourRepresentation
~vtkOrientedGlyphContourRepresentation()
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkOrientedGlyphContourRepresentation::SetCursorShape
void SetCursorShape(vtkPolyData *cursorShape)
Specify the cursor shape.
vtkOrientedGlyphContourRepresentation::SelectedNodesActor
vtkActor * SelectedNodesActor
Definition: vtkOrientedGlyphContourRepresentation.h:182
vtkOrientedGlyphContourRepresentation::ScaleContour
void ScaleContour(double eventPos[2])
vtkOrientedGlyphContourRepresentation::FocalPoint
vtkPoints * FocalPoint
Definition: vtkOrientedGlyphContourRepresentation.h:176
vtkOrientedGlyphContourRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
vtkOrientedGlyphContourRepresentation::vtkOrientedGlyphContourRepresentation
vtkOrientedGlyphContourRepresentation()
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:65
vtkOrientedGlyphContourRepresentation::SelectedNodesGlypher
vtkGlyph3D * SelectedNodesGlypher
Definition: vtkOrientedGlyphContourRepresentation.h:184
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:39
vtkOrientedGlyphContourRepresentation::BuildRepresentation
virtual void BuildRepresentation()
These are methods that satisfy vtkWidgetRepresentation's API.
vtkOrientedGlyphContourRepresentation::Actor
vtkActor * Actor
Definition: vtkOrientedGlyphContourRepresentation.h:167
vtkOrientedGlyphContourRepresentation::GetActors
virtual void GetActors(vtkPropCollection *)
Methods to make this class behave as a vtkProp.
vtkOrientedGlyphContourRepresentation::Scale
void Scale(double eventPos[2])
vtkOrientedGlyphContourRepresentation::CursorShape
vtkPolyData * CursorShape
Definition: vtkOrientedGlyphContourRepresentation.h:173