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 
34 
35 class vtkProperty2D;
36 class vtkActor2D;
38 class vtkPolyData;
39 class vtkGlyph2D;
40 class vtkPoints;
41 class vtkPolyData;
42 
45 {
46 public:
49 
51 
54  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
61  void SetCursorShape(vtkPolyData *cursorShape);
62  vtkPolyData *GetCursorShape();
64 
66 
69  void SetActiveCursorShape(vtkPolyData *activeShape);
70  vtkPolyData *GetActiveCursorShape();
72 
74 
76  vtkGetObjectMacro(Property,vtkProperty2D);
78 
80 
82  vtkGetObjectMacro(ActiveProperty,vtkProperty2D);
84 
86 
87  vtkGetObjectMacro(LinesProperty,vtkProperty2D);
89 
91 
94  virtual void SetRenderer(vtkRenderer *ren);
95  virtual void BuildRepresentation();
96  virtual void StartWidgetInteraction(double eventPos[2]);
97  virtual void WidgetInteraction(double eventPos[2]);
98  virtual int ComputeInteractionState(int X, int Y, int modified=0);
100 
102 
103  virtual void GetActors2D(vtkPropCollection *);
104  virtual void ReleaseGraphicsResources(vtkWindow *);
105  virtual int RenderOverlay(vtkViewport *viewport);
106  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
107  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
108  virtual int HasTranslucentPolygonalGeometry();
110 
113 
119  vtkMatrix4x4 *GetContourPlaneDirectionCosines(const double origin[3]);
120 
121 protected:
124 
125  // Render the cursor
138 
139  // The polydata represents the contour in display co-ordinates.
143 
144  // The polydata represents the contour in world coordinates. It is updated
145  // (kept in sync with Lines) every time the GetContourRepresentationAsPolyData()
146  // method is called.
148 
149  // Support picking
150  double LastPickPosition[3];
151  double LastEventPosition[2];
152 
153  // Methods to manipulate the cursor
154  void Translate(double eventPos[2]);
155  void Scale(double eventPos[2]);
156  void ShiftContour(double eventPos[2]);
157  void ScaleContour(double eventPos[2]);
158 
159  void ComputeCentroid(double* ioCentroid);
160 
161  // Properties used to control the appearance of selected objects and
162  // the manipulator in general.
166 
168 
169  void CreateDefaultProperties();
170 
171 
172  // Distance between where the mouse event happens and where the
173  // widget is focused - maintain this distance during interaction.
174  double InteractionOffset[2];
175 
176  void BuildLines();
177 
178 private:
180  void operator=(const vtkOrientedGlyphFocalPlaneContourRepresentation&); //Not implemented
181 };
182 
183 #endif
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:37
virtual void WidgetInteraction(double e[2])=0
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:37
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual vtkPolyData * GetContourRepresentationAsPolyData()=0
a actor that draws 2D data
Definition: vtkActor2D.h:43
virtual void SetRenderer(vtkRenderer *ren)
abstract specification for renderers
Definition: vtkRenderer.h:69
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
virtual int RenderOpaqueGeometry(vtkViewport *viewport)=0
virtual void StartWidgetInteraction(double e[2])=0
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)=0
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual int RenderOverlay(vtkViewport *viewport)=0
virtual void BuildLines()=0
represent a contour drawn on the focal plane.
#define VTK_WIDGETS_EXPORT
virtual int HasTranslucentPolygonalGeometry()=0
virtual void GetActors2D(vtkPropCollection *)
void PrintSelf(ostream &os, vtkIndent indent)
represent surface properties of a 2D image
Definition: vtkProperty2D.h:38
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