00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00071 #ifndef __vtkGenericAdaptorCell_h
00072 #define __vtkGenericAdaptorCell_h
00073
00074
00075 #include "vtkObject.h"
00076
00077 class vtkLine;
00078 class vtkTetra;
00079 class vtkPoints;
00080 class vtkVertex;
00081 class vtkTriangle;
00082 class vtkCellData;
00083 class vtkPointData;
00084 class vtkCellArray;
00085 class vtkDoubleArray;
00086 class vtkGenericCellIterator;
00087 class vtkPointLocator;
00088 class vtkContourValues;
00089 class vtkImplicitFunction;
00090 class vtkGenericCellTessellator;
00091 class vtkGenericAttributeCollection;
00092 class vtkGenericAttribute;
00093
00094
00095 class VTK_FILTERING_EXPORT vtkGenericAdaptorCell : public vtkObject
00096 {
00097 public:
00098 vtkTypeRevisionMacro(vtkGenericAdaptorCell,vtkObject);
00099 void PrintSelf(ostream& os, vtkIndent indent);
00100
00103 virtual vtkIdType GetId() = 0;
00104
00106 virtual int IsInDataSet()=0;
00107
00112 virtual int GetType()=0;
00113
00116 virtual int GetDimension() = 0;
00117
00120 virtual int GetGeometryOrder()=0;
00121
00124 int IsGeometryLinear();
00125
00128 virtual int GetAttributeOrder(vtkGenericAttribute *a)=0;
00129
00132 int IsAttributeLinear(vtkGenericAttribute *a);
00133
00135 virtual int IsPrimary()=0;
00136
00139 virtual int GetNumberOfPoints()=0;
00140
00145 virtual int GetNumberOfBoundaries(int dim=-1)=0;
00146
00152 virtual int GetNumberOfDOFNodes()=0;
00153
00156 virtual vtkGenericCellIterator *NewCellIterator()=0;
00157
00159
00163 virtual void GetBoundaryIterator(vtkGenericCellIterator *boundaries,
00164 int dim=-1)=0;
00166
00168
00173 virtual int CountNeighbors(vtkGenericAdaptorCell *boundary)=0;
00174 virtual void CountEdgeNeighbors( int* sharing ) = 0;
00176
00178
00184 virtual void GetNeighbors(vtkGenericAdaptorCell *boundary,
00185 vtkGenericCellIterator *neighbors)=0;
00187
00189
00193 virtual int FindClosestBoundary(int subId,
00194 double pcoords[3],
00195 vtkGenericCellIterator* &boundary)=0;
00197
00199
00207 virtual int EvaluatePosition(double x[3],
00208 double *closestPoint,
00209 int &subId,
00210 double pcoords[3],
00211 double &dist2)=0;
00213
00215
00220 virtual void EvaluateLocation(int subId,
00221 double pcoords[3],
00222 double x[3])=0;
00224
00226
00231 virtual void InterpolateTuple(vtkGenericAttribute *a, double pcoords[3],
00232 double *val) = 0;
00234
00236
00241 virtual void InterpolateTuple(vtkGenericAttributeCollection *c,
00242 double pcoords[3],
00243 double *val) = 0;
00245
00247
00267 virtual void Contour(vtkContourValues *values,
00268 vtkImplicitFunction *f,
00269 vtkGenericAttributeCollection *attributes,
00270 vtkGenericCellTessellator *tess,
00271 vtkPointLocator *locator,
00272 vtkCellArray *verts,
00273 vtkCellArray *lines,
00274 vtkCellArray *polys,
00275 vtkPointData *outPd,
00276 vtkCellData *outCd);
00278
00280
00306 virtual void Clip(double value,
00307 vtkImplicitFunction *f,
00308 vtkGenericAttributeCollection *attributes,
00309 vtkGenericCellTessellator *tess,
00310 int insideOut,
00311 vtkPointLocator *locator,
00312 vtkCellArray *connectivity,
00313 vtkPointData *outPd,
00314 vtkCellData *outCd);
00316
00318
00324 virtual int IntersectWithLine(double p1[3],
00325 double p2[3],
00326 double tol,
00327 double &t,
00328 double x[3],
00329 double pcoords[3],
00330 int &subId)=0;
00332
00334
00343 virtual void Derivatives(int subId,
00344 double pcoords[3],
00345 vtkGenericAttribute *attribute,
00346 double *derivs)=0;
00348
00351 virtual void GetBounds(double bounds[6])=0;
00352
00356 virtual double *GetBounds()=0;
00357
00360 virtual double GetLength2()=0;
00361
00366 virtual int GetParametricCenter(double pcoords[3])=0;
00367
00374 virtual double GetParametricDistance(double pcoords[3])=0;
00375
00384 virtual double *GetParametricCoords()=0;
00385
00387
00396 virtual void Tessellate(vtkGenericAttributeCollection *attributes,
00397 vtkGenericCellTessellator *tess,
00398 vtkPoints *points, vtkCellArray* cellArray,
00399 vtkPointData *pd, vtkCellData* cd);
00401
00402
00403
00404
00407 virtual int IsFaceOnBoundary(vtkIdType faceId) = 0;
00408
00411 virtual int IsOnBoundary() = 0;
00412
00415 virtual void GetPointIds(vtkIdType *id) = 0;
00416
00417 virtual void TriangulateFace(vtkGenericAttributeCollection *attributes,
00418 vtkGenericCellTessellator *tess, int index,
00419 vtkPoints *pts, vtkCellArray *cellArray,
00420 vtkPointData *pd, vtkCellData *cd );
00421
00428 virtual int *GetFaceArray(int faceId)=0;
00429
00430 protected:
00431 vtkGenericAdaptorCell();
00432 virtual ~vtkGenericAdaptorCell();
00433
00435 void Reset();
00436
00437
00438 vtkTetra *Tetra;
00439 vtkTriangle *Triangle;
00440 vtkLine *Line;
00441 vtkVertex *Vertex;
00442
00443
00444
00445
00446
00447
00448 vtkDoubleArray *InternalPoints;
00449 vtkCellArray *InternalCellArray;
00450 vtkDoubleArray *InternalScalars;
00451
00452 vtkDoubleArray *PointDataScalars;
00453
00454
00455 vtkDoubleArray *Scalars;
00456 vtkPointData *PointData;
00457 vtkCellData *CellData;
00458
00459 private:
00460 vtkGenericAdaptorCell(const vtkGenericAdaptorCell&);
00461 void operator=(const vtkGenericAdaptorCell&);
00462 };
00463
00464 #endif