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 =========================================================================*/
30 #ifndef vtkOrientedGlyphFocalPlaneContourRepresentation_h
31 #define vtkOrientedGlyphFocalPlaneContourRepresentation_h
32 
33 #include "vtkInteractionWidgetsModule.h" // For export macro
35 
36 class vtkProperty2D;
37 class vtkActor2D;
39 class vtkPolyData;
40 class vtkGlyph2D;
41 class vtkPoints;
42 class vtkPolyData;
43 
46 {
47 public:
50 
52 
55  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
62  void SetCursorShape(vtkPolyData *cursorShape);
63  vtkPolyData *GetCursorShape();
65 
67 
70  void SetActiveCursorShape(vtkPolyData *activeShape);
71  vtkPolyData *GetActiveCursorShape();
73 
75 
77  vtkGetObjectMacro(Property,vtkProperty2D);
79 
81 
83  vtkGetObjectMacro(ActiveProperty,vtkProperty2D);
85 
87 
88  vtkGetObjectMacro(LinesProperty,vtkProperty2D);
90 
92 
95  virtual void SetRenderer(vtkRenderer *ren);
96  virtual void BuildRepresentation();
97  virtual void StartWidgetInteraction(double eventPos[2]);
98  virtual void WidgetInteraction(double eventPos[2]);
99  virtual int ComputeInteractionState(int X, int Y, int modified=0);
101 
103 
104  virtual void GetActors2D(vtkPropCollection *);
105  virtual void ReleaseGraphicsResources(vtkWindow *);
106  virtual int RenderOverlay(vtkViewport *viewport);
107  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
108  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
109  virtual int HasTranslucentPolygonalGeometry();
111 
114 
120  vtkMatrix4x4 *GetContourPlaneDirectionCosines(const double origin[3]);
121 
122 protected:
125 
126  // Render the cursor
139 
140  // The polydata represents the contour in display co-ordinates.
144 
145  // The polydata represents the contour in world coordinates. It is updated
146  // (kept in sync with Lines) every time the GetContourRepresentationAsPolyData()
147  // method is called.
149 
150  // Support picking
151  double LastPickPosition[3];
152  double LastEventPosition[2];
153 
154  // Methods to manipulate the cursor
155  void Translate(double eventPos[2]);
156  void Scale(double eventPos[2]);
157  void ShiftContour(double eventPos[2]);
158  void ScaleContour(double eventPos[2]);
159 
160  void ComputeCentroid(double* ioCentroid);
161 
162  // Properties used to control the appearance of selected objects and
163  // the manipulator in general.
167 
169 
170  void CreateDefaultProperties();
171 
172 
173  // Distance between where the mouse event happens and where the
174  // widget is focused - maintain this distance during interaction.
175  double InteractionOffset[2];
176 
177  void BuildLines();
178 
179 private:
181  void operator=(const vtkOrientedGlyphFocalPlaneContourRepresentation&); //Not implemented
182 };
183 
184 #endif
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:38
virtual void WidgetInteraction(double e[2])=0
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual vtkPolyData * GetContourRepresentationAsPolyData()=0
a actor that draws 2D data
Definition: vtkActor2D.h:44
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
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
represent a contour drawn on the focal plane.
virtual int HasTranslucentPolygonalGeometry()=0
virtual void GetActors2D(vtkPropCollection *)
void PrintSelf(ostream &os, vtkIndent indent)
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
virtual int ComputeInteractionState(int X, int Y, int modified=0)=0
virtual void BuildRepresentation()=0
static vtkObject * New()
virtual void ReleaseGraphicsResources(vtkWindow *w)=0
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:38