00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00061 #ifndef __vtkGenericAdaptorCell_h
00062 #define __vtkGenericAdaptorCell_h
00063
00064
00065 #include "vtkObject.h"
00066
00067 class vtkLine;
00068 class vtkTetra;
00069 class vtkPoints;
00070 class vtkPointLocator;
00071 class vtkVertex;
00072 class vtkTriangle;
00073 class vtkCellData;
00074 class vtkPointData;
00075 class vtkCellArray;
00076 class vtkDoubleArray;
00077 class vtkGenericCellIterator;
00078 class vtkPointLocator;
00079 class vtkContourValues;
00080 class vtkImplicitFunction;
00081 class vtkGenericCellTessellator;
00082 class vtkGenericAttributeCollection;
00083 class vtkGenericAttribute;
00084 class vtkGenericPointIterator;
00085 class vtkIdList;
00086 class vtkOrderedTriangulator;
00087 class vtkPolygon;
00088 class vtkUnsignedCharArray;
00089 class vtkQuad;
00090 class vtkHexahedron;
00091
00092 class VTK_FILTERING_EXPORT vtkGenericAdaptorCell : public vtkObject
00093 {
00094 public:
00095 vtkTypeRevisionMacro(vtkGenericAdaptorCell,vtkObject);
00096 void PrintSelf(ostream& os, vtkIndent indent);
00097
00100 virtual vtkIdType GetId() = 0;
00101
00103 virtual int IsInDataSet()=0;
00104
00109 virtual int GetType()=0;
00110
00113 virtual int GetDimension() = 0;
00114
00117 virtual int GetGeometryOrder()=0;
00118
00121 int IsGeometryLinear();
00122
00125 virtual int GetAttributeOrder(vtkGenericAttribute *a)=0;
00126
00130 virtual int GetHighestOrderAttribute(vtkGenericAttributeCollection *ac);
00131
00134 int IsAttributeLinear(vtkGenericAttribute *a);
00135
00137 virtual int IsPrimary()=0;
00138
00141 virtual int GetNumberOfPoints()=0;
00142
00151 virtual int GetNumberOfBoundaries(int dim=-1)=0;
00152
00161 virtual int GetNumberOfDOFNodes()=0;
00162
00164 virtual void GetPointIterator(vtkGenericPointIterator *it)=0;
00165
00168 virtual vtkGenericCellIterator *NewCellIterator()=0;
00169
00171
00175 virtual void GetBoundaryIterator(vtkGenericCellIterator *boundaries,
00176 int dim=-1)=0;
00178
00180
00185 virtual int CountNeighbors(vtkGenericAdaptorCell *boundary)=0;
00186 virtual void CountEdgeNeighbors( int* sharing ) = 0;
00188
00190
00196 virtual void GetNeighbors(vtkGenericAdaptorCell *boundary,
00197 vtkGenericCellIterator *neighbors)=0;
00199
00201
00205 virtual int FindClosestBoundary(int subId,
00206 double pcoords[3],
00207 vtkGenericCellIterator* &boundary)=0;
00209
00211
00219 virtual int EvaluatePosition(double x[3],
00220 double *closestPoint,
00221 int &subId,
00222 double pcoords[3],
00223 double &dist2)=0;
00225
00227
00232 virtual void EvaluateLocation(int subId,
00233 double pcoords[3],
00234 double x[3])=0;
00236
00238
00244 virtual void InterpolateTuple(vtkGenericAttribute *a, double pcoords[3],
00245 double *val) = 0;
00247
00249
00255 virtual void InterpolateTuple(vtkGenericAttributeCollection *c,
00256 double pcoords[3],
00257 double *val) = 0;
00259
00261
00290 virtual void Contour(vtkContourValues *values,
00291 vtkImplicitFunction *f,
00292 vtkGenericAttributeCollection *attributes,
00293 vtkGenericCellTessellator *tess,
00294 vtkPointLocator *locator,
00295 vtkCellArray *verts,
00296 vtkCellArray *lines,
00297 vtkCellArray *polys,
00298 vtkPointData *outPd,
00299 vtkCellData *outCd,
00300 vtkPointData *internalPd,
00301 vtkPointData *secondaryPd,
00302 vtkCellData *secondaryCd);
00304
00306
00336 virtual void Clip(double value,
00337 vtkImplicitFunction *f,
00338 vtkGenericAttributeCollection *attributes,
00339 vtkGenericCellTessellator *tess,
00340 int insideOut,
00341 vtkPointLocator *locator,
00342 vtkCellArray *connectivity,
00343 vtkPointData *outPd,
00344 vtkCellData *outCd,
00345 vtkPointData *internalPd,
00346 vtkPointData *secondaryPd,
00347 vtkCellData *secondaryCd);
00349
00351
00357 virtual int IntersectWithLine(double p1[3],
00358 double p2[3],
00359 double tol,
00360 double &t,
00361 double x[3],
00362 double pcoords[3],
00363 int &subId)=0;
00365
00367
00376 virtual void Derivatives(int subId,
00377 double pcoords[3],
00378 vtkGenericAttribute *attribute,
00379 double *derivs)=0;
00381
00384 virtual void GetBounds(double bounds[6])=0;
00385
00389 virtual double *GetBounds();
00390
00393 virtual double GetLength2();
00394
00399 virtual int GetParametricCenter(double pcoords[3])=0;
00400
00407 virtual double GetParametricDistance(double pcoords[3])=0;
00408
00417 virtual double *GetParametricCoords()=0;
00418
00420
00434 virtual void Tessellate(vtkGenericAttributeCollection *attributes,
00435 vtkGenericCellTessellator *tess,
00436 vtkPoints *points,
00437 vtkPointLocator *locator,
00438 vtkCellArray* cellArray,
00439 vtkPointData *internalPd,
00440 vtkPointData *pd, vtkCellData* cd,
00441 vtkUnsignedCharArray *types);
00443
00444
00445
00446
00449 virtual int IsFaceOnBoundary(vtkIdType faceId) = 0;
00450
00453 virtual int IsOnBoundary() = 0;
00454
00457 virtual void GetPointIds(vtkIdType *id) = 0;
00458
00460
00466 virtual void TriangulateFace(vtkGenericAttributeCollection *attributes,
00467 vtkGenericCellTessellator *tess, int index,
00468 vtkPoints *points,
00469 vtkPointLocator *locator,
00470 vtkCellArray *cellArray,
00471 vtkPointData *internalPd,
00472 vtkPointData *pd, vtkCellData *cd );
00474
00479 virtual int *GetFaceArray(int faceId)=0;
00480
00485 virtual int GetNumberOfVerticesOnFace(int faceId)=0;
00486
00491 virtual int *GetEdgeArray(int edgeId)=0;
00492
00493 protected:
00494 vtkGenericAdaptorCell();
00495 virtual ~vtkGenericAdaptorCell();
00496
00498 void Reset();
00499
00502 void AllocateTuples(int size);
00503
00504
00505 vtkTetra *Tetra;
00506 vtkTriangle *Triangle;
00507 vtkLine *Line;
00508 vtkVertex *Vertex;
00509 vtkQuad *Quad;
00510 vtkHexahedron *Hexa;
00511
00512
00513
00514
00515
00516
00517 vtkDoubleArray *InternalPoints;
00518 vtkCellArray *InternalCellArray;
00519 vtkDoubleArray *InternalScalars;
00520 vtkDoubleArray *PointDataScalars;
00521
00522 vtkIdList *InternalIds;
00523
00524
00525 vtkDoubleArray *Scalars;
00526 vtkPointData *PointData;
00527 vtkCellData *CellData;
00528
00529
00530
00531 double *Tuples;
00532 int TuplesCapacity;
00533
00534
00535 double Bounds[6];
00536
00537 private:
00538 vtkGenericAdaptorCell(const vtkGenericAdaptorCell&);
00539 void operator=(const vtkGenericAdaptorCell&);
00540 };
00541
00542 #endif