VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Interaction
Widgets
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
34
#include "
vtkFocalPlaneContourRepresentation.h
"
35
36
class
vtkProperty2D
;
37
class
vtkActor2D
;
38
class
vtkPolyDataMapper2D
;
39
class
vtkPolyData
;
40
class
vtkGlyph2D
;
41
class
vtkPoints
;
42
class
vtkPolyData
;
43
44
class
VTKINTERACTIONWIDGETS_EXPORT
vtkOrientedGlyphFocalPlaneContourRepresentation
:
45
public
vtkFocalPlaneContourRepresentation
46
{
47
public
:
49
static
vtkOrientedGlyphFocalPlaneContourRepresentation
*
New
();
50
52
53
vtkTypeMacro(
vtkOrientedGlyphFocalPlaneContourRepresentation
,
54
vtkFocalPlaneContourRepresentation
);
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
113
virtual
vtkPolyData
*
GetContourRepresentationAsPolyData
();
114
120
vtkMatrix4x4
*GetContourPlaneDirectionCosines(
const
double
origin[3]);
121
122
protected
:
123
vtkOrientedGlyphFocalPlaneContourRepresentation
();
124
~
vtkOrientedGlyphFocalPlaneContourRepresentation
();
125
126
// Render the cursor
127
vtkActor2D
*
Actor
;
128
vtkPolyDataMapper2D
*
Mapper
;
129
vtkGlyph2D
*
Glypher
;
130
vtkActor2D
*
ActiveActor
;
131
vtkPolyDataMapper2D
*
ActiveMapper
;
132
vtkGlyph2D
*
ActiveGlypher
;
133
vtkPolyData
*
CursorShape
;
134
vtkPolyData
*
ActiveCursorShape
;
135
vtkPolyData
*
FocalData
;
136
vtkPoints
*
FocalPoint
;
137
vtkPolyData
*
ActiveFocalData
;
138
vtkPoints
*
ActiveFocalPoint
;
139
140
// The polydata represents the contour in display co-ordinates.
141
vtkPolyData
*
Lines
;
142
vtkPolyDataMapper2D
*
LinesMapper
;
143
vtkActor2D
*
LinesActor
;
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.
148
vtkPolyData
*
LinesWorldCoordinates
;
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.
164
vtkProperty2D
*
Property
;
165
vtkProperty2D
*
ActiveProperty
;
166
vtkProperty2D
*
LinesProperty
;
167
168
vtkMatrix4x4
*
ContourPlaneDirectionCosines
;
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
:
180
vtkOrientedGlyphFocalPlaneContourRepresentation
(
const
vtkOrientedGlyphFocalPlaneContourRepresentation
&);
//Not implemented
181
void
operator=(
const
vtkOrientedGlyphFocalPlaneContourRepresentation
&);
//Not implemented
182
};
183
184
#endif
Generated on Thu May 24 2012 22:22:27 for VTK by
1.8.1