VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
vtkPicker.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkPicker.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
=========================================================================*/
43
#ifndef __vtkPicker_h
44
#define __vtkPicker_h
45
46
#include "
vtkAbstractPropPicker.h
"
47
48
class
vtkAbstractMapper3D
;
49
class
vtkDataSet
;
50
class
vtkTransform
;
51
class
vtkActorCollection
;
52
class
vtkProp3DCollection
;
53
class
vtkPoints
;
54
55
class
VTK_RENDERING_EXPORT
vtkPicker
:
public
vtkAbstractPropPicker
56
{
57
public
:
58
static
vtkPicker
*
New
();
59
vtkTypeMacro(
vtkPicker
,
vtkAbstractPropPicker
);
60
void
PrintSelf
(ostream& os,
vtkIndent
indent);
61
63
66
vtkSetMacro(Tolerance,
double
);
67
vtkGetMacro(Tolerance,
double
);
69
71
73
vtkGetVectorMacro(MapperPosition,
double
,3);
75
77
78
vtkGetObjectMacro(Mapper,
vtkAbstractMapper3D
);
80
82
84
vtkGetObjectMacro(DataSet,
vtkDataSet
);
86
89
vtkProp3DCollection
*
GetProp3Ds
() {
return
this->Prop3Ds;};
90
94
vtkActorCollection
*GetActors();
95
99
vtkPoints
*
GetPickedPositions
() {
return
this->PickedPositions;};
100
102
106
virtual
int
Pick
(
double
selectionX,
double
selectionY,
double
selectionZ,
107
vtkRenderer
*renderer);
109
111
115
int
Pick
(
double
selectionPt[3],
vtkRenderer
*ren)
116
{
return
this->
Pick
(selectionPt[0], selectionPt[1], selectionPt[2], ren);};
118
119
protected
:
120
vtkPicker
();
121
~
vtkPicker
();
122
123
void
MarkPicked(
vtkAssemblyPath
*path,
vtkProp3D
*p,
vtkAbstractMapper3D
*m,
124
double
tMin,
double
mapperPos[3]);
125
virtual
double
IntersectWithLine(
double
p1[3],
double
p2[3],
double
tol,
126
vtkAssemblyPath
*path,
vtkProp3D
*p,
127
vtkAbstractMapper3D
*m);
128
virtual
void
Initialize
();
129
130
double
Tolerance
;
//tolerance for computation (% of window)
131
double
MapperPosition[3];
//selection point in untransformed coordinates
132
133
vtkAbstractMapper3D
*
Mapper
;
//selected mapper (if the prop has a mapper)
134
vtkDataSet
*
DataSet
;
//selected dataset (if there is one)
135
136
double
GlobalTMin
;
//parametric coordinate along pick ray where hit occured
137
vtkTransform
*
Transform
;
//use to perform ray transformation
138
vtkActorCollection
*
Actors
;
//candidate actors (based on bounding box)
139
vtkProp3DCollection
*
Prop3Ds
;
//candidate actors (based on bounding box)
140
vtkPoints
*
PickedPositions
;
// candidate positions
141
142
private
:
143
vtkPicker
(
const
vtkPicker
&);
// Not implemented.
144
void
operator=(
const
vtkPicker
&);
// Not implemented.
145
};
146
147
148
#endif
149
150
Generated on Wed Nov 21 2012 21:34:04 for VTK by
1.8.2