VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkPyramid.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkPyramid.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
=========================================================================*/
36
#ifndef __vtkPyramid_h
37
#define __vtkPyramid_h
38
39
#include "
vtkCell3D.h
"
40
41
class
vtkLine
;
42
class
vtkQuad
;
43
class
vtkTriangle
;
44
class
vtkUnstructuredGrid
;
45
class
vtkIncrementalPointLocator
;
46
47
class
VTK_FILTERING_EXPORT
vtkPyramid
:
public
vtkCell3D
48
{
49
public
:
50
static
vtkPyramid
*
New
();
51
vtkTypeMacro(
vtkPyramid
,
vtkCell3D
);
52
void
PrintSelf
(ostream& os,
vtkIndent
indent);
53
55
56
virtual
void
GetEdgePoints
(
int
edgeId,
int
* &pts);
57
virtual
void
GetFacePoints
(
int
faceId,
int
* &pts);
59
61
62
int
GetCellType
() {
return
VTK_PYRAMID
;}
63
int
GetCellDimension
() {
return
3;}
64
int
GetNumberOfEdges
() {
return
8;}
65
int
GetNumberOfFaces
() {
return
5;}
66
vtkCell
*
GetEdge
(
int
edgeId);
67
vtkCell
*
GetFace
(
int
faceId);
68
int
CellBoundary
(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
69
void
Contour
(
double
value
,
vtkDataArray
*cellScalars,
70
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
71
vtkCellArray
*lines,
vtkCellArray
*polys,
72
vtkPointData
*inPd,
vtkPointData
*outPd,
73
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
74
int
EvaluatePosition
(
double
x[3],
double
* closestPoint,
75
int
& subId,
double
pcoords[3],
76
double
& dist2,
double
*weights);
77
void
EvaluateLocation
(
int
& subId,
double
pcoords[3],
double
x[3],
78
double
*weights);
79
int
IntersectWithLine
(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
80
double
x[3],
double
pcoords[3],
int
& subId);
81
int
Triangulate
(
int
index
,
vtkIdList
*ptIds,
vtkPoints
*pts);
82
void
Derivatives
(
int
subId,
double
pcoords[3],
double
*values,
83
int
dim,
double
*derivs);
84
virtual
double
*
GetParametricCoords
();
86
88
int
GetParametricCenter
(
double
pcoords[3]);
89
91
93
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[5]);
94
// Description:
95
// @deprecated Replaced by vtkPyramid::InterpolateDerivs as of VTK 5.2
96
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[15]);
97
// Description:
98
// Compute the interpolation functions/derivatives
99
// (aka shape functions/derivatives)
100
virtual
void
InterpolateFunctions
(
double
pcoords[3],
double
weights[5])
101
{
102
vtkPyramid::InterpolationFunctions
(pcoords,weights);
103
}
104
virtual
void
InterpolateDerivs
(
double
pcoords[3],
double
derivs[15])
105
{
106
vtkPyramid::InterpolationDerivs
(pcoords,derivs);
107
}
109
110
int
JacobianInverse(
double
pcoords[3],
double
**inverse,
double
derivs[15]);
111
113
115
static
int
*GetEdgeArray(
int
edgeId);
116
static
int
*GetFaceArray(
int
faceId);
118
119
protected
:
120
vtkPyramid
();
121
~
vtkPyramid
();
122
123
vtkLine
*
Line
;
124
vtkTriangle
*
Triangle
;
125
vtkQuad
*
Quad
;
126
127
private
:
128
vtkPyramid
(
const
vtkPyramid
&);
// Not implemented.
129
void
operator=(
const
vtkPyramid
&);
// Not implemented.
130
};
131
132
//----------------------------------------------------------------------------
133
inline
int
vtkPyramid::GetParametricCenter
(
double
pcoords[3])
134
{
135
pcoords[0] = pcoords[1] = 0.4;
136
pcoords[2] = 0.2;
137
return
0;
138
}
139
140
#endif
141
142
143
Generated on Fri Aug 2 2013 12:19:48 for VTK by
1.8.4