VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkTetra.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkTetra.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
=========================================================================*/
35
#ifndef __vtkTetra_h
36
#define __vtkTetra_h
37
38
#include "
vtkCell3D.h
"
39
40
class
vtkLine
;
41
class
vtkTriangle
;
42
class
vtkUnstructuredGrid
;
43
class
vtkIncrementalPointLocator
;
44
45
class
VTK_FILTERING_EXPORT
vtkTetra
:
public
vtkCell3D
46
{
47
public
:
48
static
vtkTetra
*
New
();
49
vtkTypeMacro(
vtkTetra
,
vtkCell3D
);
50
void
PrintSelf
(ostream& os,
vtkIndent
indent);
51
53
54
virtual
void
GetEdgePoints
(
int
edgeId,
int
* &pts);
55
virtual
void
GetFacePoints
(
int
faceId,
int
* &pts);
57
59
60
int
GetCellType
() {
return
VTK_TETRA
;}
61
int
GetNumberOfEdges
() {
return
6;}
62
int
GetNumberOfFaces
() {
return
4;}
63
vtkCell
*
GetEdge
(
int
edgeId);
64
vtkCell
*
GetFace
(
int
faceId);
65
void
Contour
(
double
value
,
vtkDataArray
*cellScalars,
66
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
67
vtkCellArray
*lines,
vtkCellArray
*polys,
68
vtkPointData
*inPd,
vtkPointData
*outPd,
69
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
70
void
Clip
(
double
value
,
vtkDataArray
*cellScalars,
71
vtkIncrementalPointLocator
*locator,
vtkCellArray
*connectivity,
72
vtkPointData
*inPd,
vtkPointData
*outPd,
73
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd,
74
int
insideOut);
75
int
EvaluatePosition
(
double
x[3],
double
* closestPoint,
76
int
& subId,
double
pcoords[3],
77
double
& dist2,
double
*weights);
78
void
EvaluateLocation
(
int
& subId,
double
pcoords[3],
double
x[3],
79
double
*weights);
80
int
IntersectWithLine
(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
81
double
x[3],
double
pcoords[3],
int
& subId);
82
int
Triangulate
(
int
index
,
vtkIdList
*ptIds,
vtkPoints
*pts);
83
void
Derivatives
(
int
subId,
double
pcoords[3],
double
*values,
84
int
dim,
double
*derivs);
85
virtual
double
*
GetParametricCoords
();
87
91
int
CellBoundary
(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
92
94
int
GetParametricCenter
(
double
pcoords[3]);
95
98
double
GetParametricDistance
(
double
pcoords[3]);
99
101
102
static
void
TetraCenter(
double
p1[3],
double
p2[3],
double
p3[3],
double
p4[3],
103
double
center
[3]);
105
107
110
static
double
Circumsphere(
double
p1[3],
double
p2[3],
double
p3[3],
111
double
p4[3],
double
center
[3]);
113
115
118
static
double
Insphere(
double
p1[3],
double
p2[3],
double
p3[3],
119
double
p4[3],
double
center
[3]);
121
123
134
static
int
BarycentricCoords(
double
x[3],
double
x1[3],
double
x2[3],
135
double
x3[3],
double
x4[3],
double
bcoords[4]);
137
139
141
static
double
ComputeVolume(
double
p1[3],
double
p2[3],
double
p3[3],
142
double
p4[3]);
144
148
int
JacobianInverse(
double
**inverse,
double
derivs[12]);
149
151
152
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[4]);
153
// Description:
154
// @deprecated Replaced by vtkTetra::InterpolateDerivs as of VTK 5.2
155
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[12]);
156
// Description:
157
// Compute the interpolation functions/derivatives
158
// (aka shape functions/derivatives)
159
virtual
void
InterpolateFunctions
(
double
pcoords[3],
double
weights[4])
160
{
161
vtkTetra::InterpolationFunctions
(pcoords,weights);
162
}
163
virtual
void
InterpolateDerivs
(
double
pcoords[3],
double
derivs[12])
164
{
165
vtkTetra::InterpolationDerivs
(pcoords,derivs);
166
}
168
170
172
static
int
*GetEdgeArray(
int
edgeId);
173
static
int
*GetFaceArray(
int
faceId);
175
176
protected
:
177
vtkTetra
();
178
~
vtkTetra
();
179
180
vtkLine
*
Line
;
181
vtkTriangle
*
Triangle
;
182
183
private
:
184
vtkTetra
(
const
vtkTetra
&);
// Not implemented.
185
void
operator=(
const
vtkTetra
&);
// Not implemented.
186
};
187
188
inline
int
vtkTetra::GetParametricCenter
(
double
pcoords[3])
189
{
190
pcoords[0] = pcoords[1] = pcoords[2] = 0.25;
191
return
0;
192
}
193
194
#endif
195
196
197
Generated on Thu Mar 13 2014 08:09:57 for VTK by
1.8.1.2