VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkQuadraticWedge.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkQuadraticWedge.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 __vtkQuadraticWedge_h
37
#define __vtkQuadraticWedge_h
38
39
#include "
vtkNonLinearCell.h
"
40
41
class
vtkQuadraticEdge
;
42
class
vtkQuadraticQuad
;
43
class
vtkQuadraticTriangle
;
44
class
vtkWedge
;
45
class
vtkDoubleArray
;
46
47
class
VTK_FILTERING_EXPORT
vtkQuadraticWedge
:
public
vtkNonLinearCell
48
{
49
public
:
50
static
vtkQuadraticWedge
*
New
();
51
vtkTypeMacro(
vtkQuadraticWedge
,
vtkNonLinearCell
);
52
void
PrintSelf
(ostream& os,
vtkIndent
indent);
53
55
57
int
GetCellType
() {
return
VTK_QUADRATIC_WEDGE
;}
58
int
GetCellDimension
() {
return
3;}
59
int
GetNumberOfEdges
() {
return
9;}
60
int
GetNumberOfFaces
() {
return
5;}
61
vtkCell
*
GetEdge
(
int
edgeId);
62
vtkCell
*
GetFace
(
int
faceId);
64
65
int
CellBoundary
(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
66
void
Contour
(
double
value
,
vtkDataArray
*cellScalars,
67
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
68
vtkCellArray
*lines,
vtkCellArray
*polys,
69
vtkPointData
*inPd,
vtkPointData
*outPd,
70
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
71
int
EvaluatePosition
(
double
x[3],
double
* closestPoint,
72
int
& subId,
double
pcoords[3],
73
double
& dist2,
double
*weights);
74
void
EvaluateLocation
(
int
& subId,
double
pcoords[3],
double
x[3],
75
double
*weights);
76
int
Triangulate
(
int
index
,
vtkIdList
*ptIds,
vtkPoints
*pts);
77
void
Derivatives
(
int
subId,
double
pcoords[3],
double
*values,
78
int
dim,
double
*derivs);
79
virtual
double
*
GetParametricCoords
();
80
82
85
void
Clip
(
double
value
,
vtkDataArray
*cellScalars,
86
vtkIncrementalPointLocator
*locator,
vtkCellArray
*tetras,
87
vtkPointData
*inPd,
vtkPointData
*outPd,
88
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd,
89
int
insideOut);
91
93
95
int
IntersectWithLine
(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
96
double
x[3],
double
pcoords[3],
int
& subId);
98
99
101
int
GetParametricCenter
(
double
pcoords[3]);
102
104
106
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[15]);
107
// Description:
108
// @deprecated Replaced by vtkQuadraticWedge::InterpolateDerivs as of VTK 5.2
109
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[45]);
110
// Description:
111
// Compute the interpolation functions/derivatives
112
// (aka shape functions/derivatives)
113
virtual
void
InterpolateFunctions
(
double
pcoords[3],
double
weights[15])
114
{
115
vtkQuadraticWedge::InterpolationFunctions
(pcoords,weights);
116
}
117
virtual
void
InterpolateDerivs
(
double
pcoords[3],
double
derivs[45])
118
{
119
vtkQuadraticWedge::InterpolationDerivs
(pcoords,derivs);
120
}
121
// Description:
122
// Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
123
// Ids are related to the cell, not to the dataset.
124
static
int
*GetEdgeArray(
int
edgeId);
125
static
int
*GetFaceArray(
int
faceId);
127
131
void
JacobianInverse(
double
pcoords[3],
double
**inverse,
double
derivs[45]);
132
133
protected
:
134
vtkQuadraticWedge
();
135
~
vtkQuadraticWedge
();
136
137
vtkQuadraticEdge
*
Edge
;
138
vtkQuadraticTriangle
*
TriangleFace
;
139
vtkQuadraticQuad
*
Face
;
140
vtkWedge
*
Wedge
;
141
vtkPointData
*
PointData
;
142
vtkCellData
*
CellData
;
143
vtkDoubleArray
*
CellScalars
;
144
vtkDoubleArray
*
Scalars
;
//used to avoid New/Delete in contouring/clipping
145
146
void
Subdivide(
vtkPointData
*inPd,
vtkCellData
*inCd,
vtkIdType
cellId,
147
vtkDataArray
*cellScalars);
148
149
private
:
150
vtkQuadraticWedge
(
const
vtkQuadraticWedge
&);
// Not implemented.
151
void
operator=(
const
vtkQuadraticWedge
&);
// Not implemented.
152
};
153
//----------------------------------------------------------------------------
154
// Return the center of the quadratic wedge in parametric coordinates.
155
inline
int
vtkQuadraticWedge::GetParametricCenter
(
double
pcoords[3])
156
{
157
pcoords[0] = pcoords[1] = 1./3;
158
pcoords[2] = 0.5;
159
return
0;
160
}
161
162
163
#endif
164
165
Generated on Thu Mar 13 2014 08:09:57 for VTK by
1.8.1.2