VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkQuadraticTriangle.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkQuadraticTriangle.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 __vtkQuadraticTriangle_h
36
#define __vtkQuadraticTriangle_h
37
38
#include "
vtkNonLinearCell.h
"
39
40
class
vtkQuadraticEdge
;
41
class
vtkTriangle
;
42
class
vtkDoubleArray
;
43
44
class
VTK_FILTERING_EXPORT
vtkQuadraticTriangle
:
public
vtkNonLinearCell
45
{
46
public
:
47
static
vtkQuadraticTriangle
*
New
();
48
vtkTypeMacro(
vtkQuadraticTriangle
,
vtkNonLinearCell
);
49
void
PrintSelf
(ostream& os,
vtkIndent
indent);
50
52
54
int
GetCellType
() {
return
VTK_QUADRATIC_TRIANGLE
;};
55
int
GetCellDimension
() {
return
2;}
56
int
GetNumberOfEdges
() {
return
3;}
57
int
GetNumberOfFaces
() {
return
0;}
58
vtkCell
*
GetEdge
(
int
edgeId);
59
vtkCell
*
GetFace
(
int
) {
return
0;}
61
62
int
CellBoundary
(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
63
void
Contour
(
double
value
,
vtkDataArray
*cellScalars,
64
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
65
vtkCellArray
*lines,
vtkCellArray
*polys,
66
vtkPointData
*inPd,
vtkPointData
*outPd,
67
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
68
int
EvaluatePosition
(
double
x[3],
double
* closestPoint,
69
int
& subId,
double
pcoords[3],
70
double
& dist2,
double
*weights);
71
void
EvaluateLocation
(
int
& subId,
double
pcoords[3],
double
x[3],
72
double
*weights);
73
int
Triangulate
(
int
index
,
vtkIdList
*ptIds,
vtkPoints
*pts);
74
void
Derivatives
(
int
subId,
double
pcoords[3],
double
*values,
75
int
dim,
double
*derivs);
76
virtual
double
*
GetParametricCoords
();
77
79
82
void
Clip
(
double
value
,
vtkDataArray
*cellScalars,
83
vtkIncrementalPointLocator
*locator,
vtkCellArray
*polys,
84
vtkPointData
*inPd,
vtkPointData
*outPd,
85
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd,
86
int
insideOut);
88
90
92
int
IntersectWithLine
(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
93
double
x[3],
double
pcoords[3],
int
& subId);
95
96
99
int
GetParametricCenter
(
double
pcoords[3]);
100
103
double
GetParametricDistance
(
double
pcoords[3]);
104
107
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[6]);
110
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[12]);
112
114
virtual
void
InterpolateFunctions
(
double
pcoords[3],
double
weights[6])
115
{
116
vtkQuadraticTriangle::InterpolationFunctions
(pcoords,weights);
117
}
118
virtual
void
InterpolateDerivs
(
double
pcoords[3],
double
derivs[12])
119
{
120
vtkQuadraticTriangle::InterpolationDerivs
(pcoords,derivs);
121
}
123
124
protected
:
125
vtkQuadraticTriangle
();
126
~
vtkQuadraticTriangle
();
127
128
vtkQuadraticEdge
*
Edge
;
129
vtkTriangle
*
Face
;
130
vtkDoubleArray
*
Scalars
;
//used to avoid New/Delete in contouring/clipping
131
132
private
:
133
vtkQuadraticTriangle
(
const
vtkQuadraticTriangle
&);
// Not implemented.
134
void
operator=(
const
vtkQuadraticTriangle
&);
// Not implemented.
135
};
136
//----------------------------------------------------------------------------
137
inline
int
vtkQuadraticTriangle::GetParametricCenter
(
double
pcoords[3])
138
{
139
pcoords[0] = pcoords[1] = 1./3;
140
pcoords[2] = 0.0;
141
return
0;
142
}
143
144
145
#endif
146
147
Generated on Tue Jan 8 2013 05:45:26 for VTK by
1.8.1.2