VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkGenericAdaptorCell.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkGenericAdaptorCell.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
=========================================================================*/
61
#ifndef __vtkGenericAdaptorCell_h
62
#define __vtkGenericAdaptorCell_h
63
64
65
#include "
vtkObject.h
"
66
67
class
vtkLine
;
68
class
vtkTetra
;
69
class
vtkPoints
;
70
class
vtkVertex
;
71
class
vtkTriangle
;
72
class
vtkCellData
;
73
class
vtkPointData
;
74
class
vtkCellArray
;
75
class
vtkDoubleArray
;
76
class
vtkGenericCellIterator
;
77
class
vtkIncrementalPointLocator
;
78
class
vtkContourValues
;
79
class
vtkImplicitFunction
;
80
class
vtkGenericCellTessellator
;
81
class
vtkGenericAttributeCollection
;
82
class
vtkGenericAttribute
;
83
class
vtkGenericPointIterator
;
84
class
vtkIdList
;
85
class
vtkOrderedTriangulator
;
86
class
vtkPolygon
;
87
class
vtkUnsignedCharArray
;
88
class
vtkQuad
;
89
class
vtkHexahedron
;
90
class
vtkWedge
;
91
class
vtkPyramid
;
92
93
class
VTK_FILTERING_EXPORT
vtkGenericAdaptorCell
:
public
vtkObject
94
{
95
public
:
96
vtkTypeMacro(
vtkGenericAdaptorCell
,
vtkObject
);
97
void
PrintSelf
(ostream& os,
vtkIndent
indent);
98
101
virtual
vtkIdType
GetId() = 0;
102
104
virtual
int
IsInDataSet()=0;
105
110
virtual
int
GetType()=0;
111
114
virtual
int
GetDimension() = 0;
115
118
virtual
int
GetGeometryOrder()=0;
119
122
int
IsGeometryLinear();
123
126
virtual
int
GetAttributeOrder(
vtkGenericAttribute
*a)=0;
127
131
virtual
int
GetHighestOrderAttribute(
vtkGenericAttributeCollection
*ac);
132
135
int
IsAttributeLinear(
vtkGenericAttribute
*a);
136
138
virtual
int
IsPrimary()=0;
139
142
virtual
int
GetNumberOfPoints()=0;
143
152
virtual
int
GetNumberOfBoundaries(
int
dim=-1)=0;
153
162
virtual
int
GetNumberOfDOFNodes()=0;
163
165
virtual
void
GetPointIterator(
vtkGenericPointIterator
*it)=0;
166
169
virtual
vtkGenericCellIterator
*NewCellIterator()=0;
170
172
176
virtual
void
GetBoundaryIterator(
vtkGenericCellIterator
*boundaries,
177
int
dim=-1)=0;
179
181
186
virtual
int
CountNeighbors(
vtkGenericAdaptorCell
*boundary)=0;
187
virtual
void
CountEdgeNeighbors(
int
* sharing ) = 0;
189
191
197
virtual
void
GetNeighbors(
vtkGenericAdaptorCell
*boundary,
198
vtkGenericCellIterator
*neighbors)=0;
200
202
206
virtual
int
FindClosestBoundary(
int
subId,
207
double
pcoords[3],
208
vtkGenericCellIterator
* &boundary)=0;
210
212
220
virtual
int
EvaluatePosition(
double
x[3],
221
double
*closestPoint,
222
int
&subId,
223
double
pcoords[3],
224
double
&dist2)=0;
226
228
233
virtual
void
EvaluateLocation(
int
subId,
234
double
pcoords[3],
235
double
x[3])=0;
237
239
245
virtual
void
InterpolateTuple(
vtkGenericAttribute
*a,
double
pcoords[3],
246
double
*val) = 0;
248
250
256
virtual
void
InterpolateTuple(
vtkGenericAttributeCollection
*c,
257
double
pcoords[3],
258
double
*val) = 0;
260
262
291
virtual
void
Contour(
vtkContourValues
*values,
292
vtkImplicitFunction
*f,
293
vtkGenericAttributeCollection
*attributes,
294
vtkGenericCellTessellator
*tess,
295
vtkIncrementalPointLocator
*locator,
296
vtkCellArray
*verts,
297
vtkCellArray
*lines,
298
vtkCellArray
*polys,
299
vtkPointData
*outPd,
300
vtkCellData
*outCd,
301
vtkPointData
*internalPd,
302
vtkPointData
*secondaryPd,
303
vtkCellData
*secondaryCd);
305
307
337
virtual
void
Clip(
double
value
,
338
vtkImplicitFunction
*f,
339
vtkGenericAttributeCollection
*attributes,
340
vtkGenericCellTessellator
*tess,
341
int
insideOut,
342
vtkIncrementalPointLocator
*locator,
343
vtkCellArray
*connectivity,
344
vtkPointData
*outPd,
345
vtkCellData
*outCd,
346
vtkPointData
*internalPd,
347
vtkPointData
*secondaryPd,
348
vtkCellData
*secondaryCd);
350
352
358
virtual
int
IntersectWithLine(
double
p1[3],
359
double
p2[3],
360
double
tol,
361
double
&t,
362
double
x[3],
363
double
pcoords[3],
364
int
&subId)=0;
366
368
377
virtual
void
Derivatives(
int
subId,
378
double
pcoords[3],
379
vtkGenericAttribute
*attribute,
380
double
*derivs)=0;
382
385
virtual
void
GetBounds(
double
bounds[6])=0;
386
390
virtual
double
*GetBounds();
391
394
virtual
double
GetLength2();
395
400
virtual
int
GetParametricCenter(
double
pcoords[3])=0;
401
408
virtual
double
GetParametricDistance(
double
pcoords[3])=0;
409
418
virtual
double
*GetParametricCoords()=0;
419
421
435
virtual
void
Tessellate(
vtkGenericAttributeCollection
*attributes,
436
vtkGenericCellTessellator
*tess,
437
vtkPoints
*
points
,
438
vtkIncrementalPointLocator
*locator,
439
vtkCellArray
* cellArray,
440
vtkPointData
*internalPd,
441
vtkPointData
*pd,
vtkCellData
* cd,
442
vtkUnsignedCharArray
*types);
444
445
// The following methods are for the internals of the tesselation algorithm
446
// (the hash table in particular)
447
450
virtual
int
IsFaceOnBoundary(
vtkIdType
faceId) = 0;
451
454
virtual
int
IsOnBoundary() = 0;
455
459
virtual
void
GetPointIds(
vtkIdType
*
id
) = 0;
460
462
468
virtual
void
TriangulateFace(
vtkGenericAttributeCollection
*attributes,
469
vtkGenericCellTessellator
*tess,
int
index
,
470
vtkPoints
*
points
,
471
vtkIncrementalPointLocator
*locator,
472
vtkCellArray
*cellArray,
473
vtkPointData
*internalPd,
474
vtkPointData
*pd,
vtkCellData
*cd );
476
482
virtual
int
*GetFaceArray(
int
faceId)=0;
483
488
virtual
int
GetNumberOfVerticesOnFace(
int
faceId)=0;
489
495
virtual
int
*GetEdgeArray(
int
edgeId)=0;
496
497
protected
:
498
vtkGenericAdaptorCell
();
499
virtual
~
vtkGenericAdaptorCell
();
500
502
void
Reset();
503
506
void
AllocateTuples(
int
size
);
507
508
//Internal tetra used for the contouring/clipping algorithm
509
vtkTetra
*
Tetra
;
510
vtkTriangle
*
Triangle
;
511
vtkLine
*
Line
;
512
vtkVertex
*
Vertex
;
//is it used ?
513
vtkQuad
*
Quad
;
514
vtkHexahedron
*
Hexa
;
515
vtkWedge
*
Wedge
;
516
vtkPyramid
*
Pyramid
;
517
518
// Internal locator when tessellating on a cell basis, this is different
519
// from the main locator used in contour/clip filter, this locator is used for
520
// points for
521
// Be carefull the use of a vtkLocator in conjuction with the table fast
522
// tessellator is very sensitive, we need to keep all the points we used
523
vtkDoubleArray
*
InternalPoints
;
524
vtkCellArray
*
InternalCellArray
;
525
vtkDoubleArray
*
InternalScalars
;
526
vtkDoubleArray
*
PointDataScalars
;
527
528
vtkIdList
*
InternalIds
;
// used by Tessellate() and TriangulateFace()
529
530
//Attributes to mimic the vtk cell look and feel, internal use only
531
vtkDoubleArray
*
Scalars
;
532
vtkPointData
*
PointData
;
533
vtkCellData
*
CellData
;
534
535
// Scalar buffer to store the attributes values at some location
536
// There are variable members to reduce memory allocations.
537
double
*
Tuples
;
538
int
TuplesCapacity
;
539
540
// Cached Bounds.
541
double
Bounds[6];
542
543
private
:
544
vtkGenericAdaptorCell
(
const
vtkGenericAdaptorCell
&);
// Not implemented.
545
void
operator=(
const
vtkGenericAdaptorCell
&);
// Not implemented.
546
};
547
548
#endif
Generated on Wed May 30 2012 13:21:55 for VTK by
1.8.1