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