VTK
vtkOrientedGlyphFocalPlaneContourRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOrientedGlyphFocalPlaneContourRepresentation.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 vtkOrientedGlyphFocalPlaneContourRepresentation_h
32 #define vtkOrientedGlyphFocalPlaneContourRepresentation_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
36 
37 class vtkProperty2D;
38 class vtkActor2D;
40 class vtkPolyData;
41 class vtkGlyph2D;
42 class vtkPoints;
43 class vtkPolyData;
44 
45 class VTKINTERACTIONWIDGETS_EXPORT vtkOrientedGlyphFocalPlaneContourRepresentation :
47 {
48 public:
53 
55 
60  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
69  void SetCursorShape(vtkPolyData *cursorShape);
70  vtkPolyData *GetCursorShape();
72 
74 
79  void SetActiveCursorShape(vtkPolyData *activeShape);
80  vtkPolyData *GetActiveCursorShape();
82 
84 
88  vtkGetObjectMacro(Property,vtkProperty2D);
90 
92 
96  vtkGetObjectMacro(ActiveProperty,vtkProperty2D);
98 
100 
103  vtkGetObjectMacro(LinesProperty,vtkProperty2D);
105 
107 
112  virtual void SetRenderer(vtkRenderer *ren);
113  virtual void BuildRepresentation();
114  virtual void StartWidgetInteraction(double eventPos[2]);
115  virtual void WidgetInteraction(double eventPos[2]);
116  virtual int ComputeInteractionState(int X, int Y, int modified=0);
118 
120 
123  virtual void GetActors2D(vtkPropCollection *);
124  virtual void ReleaseGraphicsResources(vtkWindow *);
125  virtual int RenderOverlay(vtkViewport *viewport);
126  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
127  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
128  virtual int HasTranslucentPolygonalGeometry();
130 
135 
143  vtkMatrix4x4 *GetContourPlaneDirectionCosines(const double origin[3]);
144 
145 protected:
148 
149  // Render the cursor
162 
163  // The polydata represents the contour in display co-ordinates.
167 
168  // The polydata represents the contour in world coordinates. It is updated
169  // (kept in sync with Lines) every time the GetContourRepresentationAsPolyData()
170  // method is called.
172 
173  // Support picking
174  double LastPickPosition[3];
175  double LastEventPosition[2];
176 
177  // Methods to manipulate the cursor
178  void Translate(double eventPos[2]);
179  void Scale(double eventPos[2]);
180  void ShiftContour(double eventPos[2]);
181  void ScaleContour(double eventPos[2]);
182 
183  void ComputeCentroid(double* ioCentroid);
184 
185  // Properties used to control the appearance of selected objects and
186  // the manipulator in general.
190 
192 
193  void CreateDefaultProperties();
194 
195 
196  // Distance between where the mouse event happens and where the
197  // widget is focused - maintain this distance during interaction.
198  double InteractionOffset[2];
199 
200  void BuildLines();
201 
202 private:
204  void operator=(const vtkOrientedGlyphFocalPlaneContourRepresentation&) VTK_DELETE_FUNCTION;
205 };
206 
207 #endif
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:39
virtual void WidgetInteraction(double e[2])=0
These are methods that satisfy vtkWidgetRepresentation's API.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
abstract specification for Viewports
Definition: vtkViewport.h:47
virtual vtkPolyData * GetContourRepresentationAsPolyData()=0
Get the points in this contour as a vtkPolyData.
a actor that draws 2D data
Definition: vtkActor2D.h:45
virtual void SetRenderer(vtkRenderer *ren)
Subclasses of vtkWidgetRepresentation must implement these methods.
abstract specification for renderers
Definition: vtkRenderer.h:63
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
virtual int RenderOpaqueGeometry(vtkViewport *viewport)=0
Methods required by vtkProp superclass.
virtual void StartWidgetInteraction(double e[2])=0
These are methods that satisfy vtkWidgetRepresentation's API.
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)=0
Methods required by vtkProp superclass.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RenderOverlay(vtkViewport *viewport)=0
Methods required by vtkProp superclass.
virtual void BuildLines()=0
represent a contour drawn on the focal plane.
virtual int HasTranslucentPolygonalGeometry()=0
Methods required by vtkProp superclass.
virtual void GetActors2D(vtkPropCollection *)
void PrintSelf(ostream &os, vtkIndent indent)
Standard VTK methods.
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
virtual int ComputeInteractionState(int X, int Y, int modified=0)=0
These are methods that satisfy vtkWidgetRepresentation's API.
virtual void BuildRepresentation()=0
These are methods that satisfy vtkWidgetRepresentation's API.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void ReleaseGraphicsResources(vtkWindow *w)=0
Methods required by vtkProp superclass.
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:39