VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Common
DataModel
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 "vtkCommonDataModelModule.h"
// For export macro
39
#include "
vtkNonLinearCell.h
"
40
41
class
vtkQuadraticEdge
;
42
class
vtkTriangle
;
43
class
vtkDoubleArray
;
44
45
class
VTKCOMMONDATAMODEL_EXPORT
vtkQuadraticTriangle
:
public
vtkNonLinearCell
46
{
47
public
:
48
static
vtkQuadraticTriangle
*
New
();
49
vtkTypeMacro(
vtkQuadraticTriangle
,
vtkNonLinearCell
);
50
void
PrintSelf
(ostream& os,
vtkIndent
indent);
51
53
55
int
GetCellType
() {
return
VTK_QUADRATIC_TRIANGLE
;};
56
int
GetCellDimension
() {
return
2;}
57
int
GetNumberOfEdges
() {
return
3;}
58
int
GetNumberOfFaces
() {
return
0;}
59
vtkCell
*
GetEdge
(
int
edgeId);
60
vtkCell
*
GetFace
(
int
) {
return
0;}
62
63
int
CellBoundary
(
int
subId,
double
pcoords[3],
vtkIdList
*pts);
64
void
Contour
(
double
value
,
vtkDataArray
*cellScalars,
65
vtkIncrementalPointLocator
*locator,
vtkCellArray
*verts,
66
vtkCellArray
*lines,
vtkCellArray
*polys,
67
vtkPointData
*inPd,
vtkPointData
*outPd,
68
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd);
69
int
EvaluatePosition
(
double
x[3],
double
* closestPoint,
70
int
& subId,
double
pcoords[3],
71
double
& dist2,
double
*weights);
72
void
EvaluateLocation
(
int
& subId,
double
pcoords[3],
double
x[3],
73
double
*weights);
74
int
Triangulate
(
int
index
,
vtkIdList
*ptIds,
vtkPoints
*pts);
75
void
Derivatives
(
int
subId,
double
pcoords[3],
double
*values,
76
int
dim,
double
*derivs);
77
virtual
double
*
GetParametricCoords
();
78
80
83
void
Clip
(
double
value
,
vtkDataArray
*cellScalars,
84
vtkIncrementalPointLocator
*locator,
vtkCellArray
*polys,
85
vtkPointData
*inPd,
vtkPointData
*outPd,
86
vtkCellData
*inCd,
vtkIdType
cellId,
vtkCellData
*outCd,
87
int
insideOut);
89
91
93
int
IntersectWithLine
(
double
p1[3],
double
p2[3],
double
tol,
double
& t,
94
double
x[3],
double
pcoords[3],
int
& subId);
96
97
100
int
GetParametricCenter
(
double
pcoords[3]);
101
104
double
GetParametricDistance
(
double
pcoords[3]);
105
108
static
void
InterpolationFunctions(
double
pcoords[3],
double
weights[6]);
111
static
void
InterpolationDerivs(
double
pcoords[3],
double
derivs[12]);
113
115
virtual
void
InterpolateFunctions
(
double
pcoords[3],
double
weights[6])
116
{
117
vtkQuadraticTriangle::InterpolationFunctions
(pcoords,weights);
118
}
119
virtual
void
InterpolateDerivs
(
double
pcoords[3],
double
derivs[12])
120
{
121
vtkQuadraticTriangle::InterpolationDerivs
(pcoords,derivs);
122
}
124
125
protected
:
126
vtkQuadraticTriangle
();
127
~
vtkQuadraticTriangle
();
128
129
vtkQuadraticEdge
*
Edge
;
130
vtkTriangle
*
Face
;
131
vtkDoubleArray
*
Scalars
;
//used to avoid New/Delete in contouring/clipping
132
133
private
:
134
vtkQuadraticTriangle
(
const
vtkQuadraticTriangle
&);
// Not implemented.
135
void
operator=(
const
vtkQuadraticTriangle
&);
// Not implemented.
136
};
137
//----------------------------------------------------------------------------
138
inline
int
vtkQuadraticTriangle::GetParametricCenter
(
double
pcoords[3])
139
{
140
pcoords[0] = pcoords[1] = 1./3;
141
pcoords[2] = 0.0;
142
return
0;
143
}
144
145
146
#endif
147
148
Generated on Thu May 24 2012 22:22:11 for VTK by
1.8.1