VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkBiQuadraticTriangle.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkBiQuadraticTriangle.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
=========================================================================*/
40
#ifndef __vtkBiQuadraticTriangle_h
41
#define __vtkBiQuadraticTriangle_h
42
43
#include "
vtkNonLinearCell.h
"
44
45
class
vtkQuadraticEdge
;
46
class
vtkTriangle
;
47
class
vtkDoubleArray
;
48
49
class
VTK_FILTERING_EXPORT
vtkBiQuadraticTriangle
:
public
vtkNonLinearCell
50
{
51
public
:
52
static
vtkBiQuadraticTriangle
*New();
53
vtkTypeMacro(
vtkBiQuadraticTriangle
,
vtkNonLinearCell
);
54
void
PrintSelf
(ostream& os,
vtkIndent
indent);
55
57
59
int
GetCellType
() {
return
VTK_BIQUADRATIC_TRIANGLE
;};
60
int
GetCellDimension
() {
return
2;}
61
int
GetNumberOfEdges
() {
return
3;}
62
int
GetNumberOfFaces
() {
return
0;}
63
vtkCell *GetEdge(
int
edgeId);
64
vtkCell *
GetFace
(
int
) {
return
0;}
66
67
int
CellBoundary(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
68
void
Contour(
double
value,
vtkDataArray
*cellScalars,
69
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
70
vtkCellArray
*lines,
vtkCellArray
*polys,
71
vtkPointData
*inPd,
vtkPointData
*outPd,
72
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
73
int
EvaluatePosition(
double
x[3],
double
* closestPoint,
74
int
& subId,
double
pcoords[3],
75
double
& dist2,
double
*weights);
76
void
EvaluateLocation(
int
& subId,
double
pcoords[3],
double
x[3],
77
double
*weights);
78
int
Triangulate(
int
index,
vtkIdList
*ptIds,
vtkPoints
*pts);
79
void
Derivatives(
int
subId,
double
pcoords[3],
double
*values,
80
int
dim,
double
*derivs);
81
virtual
double
*GetParametricCoords();
82
84
87
void
Clip(
double
value,
vtkDataArray
*cellScalars,
88
vtkIncrementalPointLocator
*locator,
vtkCellArray
*polys,
89
vtkPointData
*inPd,
vtkPointData
*outPd,
90
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd,
91
int
insideOut);
93
95
97
int
IntersectWithLine(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
98
double
x[3],
double
pcoords[3],
int
& subId);
100
101
104
int
GetParametricCenter(
double
pcoords[3]);
105
108
double
GetParametricDistance(
double
pcoords[3]);
109
111
113
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[7]);
114
// Description:
115
// @deprecated Replaced by vtkBiQuadraticTriangle::InterpolateDerivs as of VTK 5.2
116
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[14]);
117
// Description:
118
// Compute the interpolation functions/derivatives
119
// (aka shape functions/derivatives)
120
virtual
void
InterpolateFunctions
(
double
pcoords[3],
double
weights[7])
121
{
122
vtkBiQuadraticTriangle::InterpolationFunctions
(pcoords,weights);
123
}
124
virtual
void
InterpolateDerivs
(
double
pcoords[3],
double
derivs[14])
125
{
126
vtkBiQuadraticTriangle::InterpolationDerivs
(pcoords,derivs);
127
}
129
130
protected
:
131
vtkBiQuadraticTriangle
();
132
~
vtkBiQuadraticTriangle
();
133
134
vtkQuadraticEdge
*
Edge
;
135
vtkTriangle
*
Face
;
136
vtkDoubleArray
*
Scalars
;
//used to avoid New/Delete in contouring/clipping
137
138
private
:
139
vtkBiQuadraticTriangle
(
const
vtkBiQuadraticTriangle
&);
// Not implemented.
140
void
operator=(
const
vtkBiQuadraticTriangle
&);
// Not implemented.
141
};
142
//----------------------------------------------------------------------------
143
inline
int
vtkBiQuadraticTriangle::GetParametricCenter
(
double
pcoords[3])
144
{
145
pcoords[0] = pcoords[1] = 1./3;
146
pcoords[2] = 0.0;
147
return
0;
148
}
149
150
151
#endif
152
153
Generated on Sun Sep 15 2013 03:44:21 for VTK by
1.8.4