VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Common
DataModel
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 "vtkCommonDataModelModule.h"
// For export macro
40
#include "
vtkNonLinearCell.h
"
41
42
class
vtkQuadraticEdge
;
43
class
vtkQuadraticQuad
;
44
class
vtkQuadraticTriangle
;
45
class
vtkWedge
;
46
class
vtkDoubleArray
;
47
48
class
VTKCOMMONDATAMODEL_EXPORT
vtkQuadraticWedge
:
public
vtkNonLinearCell
49
{
50
public
:
51
static
vtkQuadraticWedge
*
New
();
52
vtkTypeMacro(
vtkQuadraticWedge
,
vtkNonLinearCell
);
53
void
PrintSelf
(ostream& os,
vtkIndent
indent);
54
56
58
int
GetCellType
() {
return
VTK_QUADRATIC_WEDGE
;}
59
int
GetCellDimension
() {
return
3;}
60
int
GetNumberOfEdges
() {
return
9;}
61
int
GetNumberOfFaces
() {
return
5;}
62
vtkCell
*
GetEdge
(
int
edgeId);
63
vtkCell
*
GetFace
(
int
faceId);
65
66
int
CellBoundary
(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
67
void
Contour
(
double
value
,
vtkDataArray
*cellScalars,
68
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
69
vtkCellArray
*lines,
vtkCellArray
*polys,
70
vtkPointData
*inPd,
vtkPointData
*outPd,
71
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
72
int
EvaluatePosition
(
double
x[3],
double
* closestPoint,
73
int
& subId,
double
pcoords[3],
74
double
& dist2,
double
*weights);
75
void
EvaluateLocation
(
int
& subId,
double
pcoords[3],
double
x[3],
76
double
*weights);
77
int
Triangulate
(
int
index
,
vtkIdList
*ptIds,
vtkPoints
*pts);
78
void
Derivatives
(
int
subId,
double
pcoords[3],
double
*values,
79
int
dim,
double
*derivs);
80
virtual
double
*
GetParametricCoords
();
81
83
86
void
Clip
(
double
value
,
vtkDataArray
*cellScalars,
87
vtkIncrementalPointLocator
*locator,
vtkCellArray
*tetras,
88
vtkPointData
*inPd,
vtkPointData
*outPd,
89
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd,
90
int
insideOut);
92
94
96
int
IntersectWithLine
(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
97
double
x[3],
double
pcoords[3],
int
& subId);
99
100
102
int
GetParametricCenter
(
double
pcoords[3]);
103
106
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[15]);
109
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[45]);
111
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
}
122
123
125
static
int
*GetEdgeArray(
int
edgeId);
126
static
int
*GetFaceArray(
int
faceId);
128
132
void
JacobianInverse(
double
pcoords[3],
double
**inverse,
double
derivs[45]);
133
134
protected
:
135
vtkQuadraticWedge
();
136
~
vtkQuadraticWedge
();
137
138
vtkQuadraticEdge
*
Edge
;
139
vtkQuadraticTriangle
*
TriangleFace
;
140
vtkQuadraticQuad
*
Face
;
141
vtkWedge
*
Wedge
;
142
vtkPointData
*
PointData
;
143
vtkCellData
*
CellData
;
144
vtkDoubleArray
*
CellScalars
;
145
vtkDoubleArray
*
Scalars
;
//used to avoid New/Delete in contouring/clipping
146
147
void
Subdivide(
vtkPointData
*inPd,
vtkCellData
*inCd,
vtkIdType
cellId,
148
vtkDataArray
*cellScalars);
149
150
private
:
151
vtkQuadraticWedge
(
const
vtkQuadraticWedge
&);
// Not implemented.
152
void
operator=(
const
vtkQuadraticWedge
&);
// Not implemented.
153
};
154
//----------------------------------------------------------------------------
155
// Return the center of the quadratic wedge in parametric coordinates.
156
inline
int
vtkQuadraticWedge::GetParametricCenter
(
double
pcoords[3])
157
{
158
pcoords[0] = pcoords[1] = 1./3;
159
pcoords[2] = 0.5;
160
return
0;
161
}
162
163
164
#endif
165
166
Generated on Thu May 24 2012 22:22:11 for VTK by
1.8.1