VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
vtkClosedSurfacePointPlacer.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkClosedSurfacePointPlacer.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
=========================================================================*/
27
#ifndef __vtkClosedSurfacePointPlacer_h
28
#define __vtkClosedSurfacePointPlacer_h
29
30
#include "
vtkPointPlacer.h
"
31
32
class
vtkPlane
;
33
class
vtkPlaneCollection
;
34
class
vtkPlanes
;
35
class
vtkRenderer
;
36
37
class
VTK_WIDGETS_EXPORT
vtkClosedSurfacePointPlacer
:
public
vtkPointPlacer
38
{
39
public
:
41
static
vtkClosedSurfacePointPlacer
*
New
();
42
44
45
vtkTypeMacro(
vtkClosedSurfacePointPlacer
,
vtkPointPlacer
);
46
void
PrintSelf
(ostream& os,
vtkIndent
indent);
48
50
56
void
AddBoundingPlane(
vtkPlane
*plane);
57
void
RemoveBoundingPlane(
vtkPlane
*plane);
58
void
RemoveAllBoundingPlanes();
59
virtual
void
SetBoundingPlanes(
vtkPlaneCollection
*);
60
vtkGetObjectMacro(BoundingPlanes,
vtkPlaneCollection
);
61
void
SetBoundingPlanes(
vtkPlanes
*planes);
63
65
74
int
ComputeWorldPosition
(
vtkRenderer
*ren,
75
double
displayPos[2],
76
double
worldPos[3],
77
double
worldOrient[9] );
79
81
89
int
ComputeWorldPosition
(
vtkRenderer
*ren,
90
double
displayPos[2],
91
double
refWorldPos[2],
92
double
worldPos[3],
93
double
worldOrient[9] );
95
98
int
ValidateWorldPosition
(
double
worldPos[3] );
99
100
// Descrption:
101
// Orientationation is ignored, and the above method
102
// is called instead.
103
int
ValidateWorldPosition
(
double
worldPos[3],
104
double
worldOrient[9]);
105
106
// Descrption:
107
// The minimum distance the object should be from the faces of the object.
108
// Must be greater than 0. Default is 0.
109
vtkSetClampMacro( MinimumDistance,
double
, 0.0,
VTK_DOUBLE_MAX
);
110
vtkGetMacro( MinimumDistance,
double
);
111
112
protected
:
113
vtkClosedSurfacePointPlacer
();
114
~
vtkClosedSurfacePointPlacer
();
115
116
// A collection of planes used to bound the projection
117
// plane
118
vtkPlaneCollection
*
BoundingPlanes
;
119
120
// Calculate the distance of a point from the Object. Negative
121
// values imply that the point is outside. Positive values imply that it is
122
// inside. The closest point to the object is returned in closestPt.
123
static
double
GetDistanceFromObject(
double
pos[3],
124
vtkPlaneCollection
* pc,
125
double
closestPt[3]);
126
127
void
BuildPlanes();
128
129
double
MinimumDistance
;
130
vtkPlaneCollection
*
InnerBoundingPlanes
;
131
132
private
:
133
vtkClosedSurfacePointPlacer
(
const
vtkClosedSurfacePointPlacer
&);
//Not implemented
134
void
operator=(
const
vtkClosedSurfacePointPlacer
&);
//Not implemented
135
};
136
137
#endif
Generated on Thu Mar 13 2014 08:10:40 for VTK by
1.8.1.2