00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkBridgeCell_h
00028 #define __vtkBridgeCell_h
00029
00030 #include "vtkBridgeExport.h"
00031 #include "vtkGenericAdaptorCell.h"
00032
00033 class vtkCell;
00034 class vtkBridgeDataSet;
00035 class vtkBridgeCellIterator;
00036
00037 class VTK_BRIDGE_EXPORT vtkBridgeCell : public vtkGenericAdaptorCell
00038 {
00039 public:
00040 static vtkBridgeCell *New();
00041 vtkTypeRevisionMacro(vtkBridgeCell,vtkGenericAdaptorCell);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00046 virtual vtkIdType GetId();
00047
00049 virtual int IsInDataSet();
00050
00054 virtual int GetType();
00055
00058 virtual int GetDimension();
00059
00061 virtual int GetGeometryOrder();
00062
00065 int IsGeometryLinear();
00066
00069 virtual int GetAttributeOrder(vtkGenericAttribute *a);
00070
00074 int IsAttributeLinear(vtkGenericAttribute *a);
00075
00077 virtual int IsPrimary();
00078
00081 virtual int GetNumberOfPoints();
00082
00091 virtual int GetNumberOfBoundaries(int dim=-1);
00092
00101 virtual int GetNumberOfDOFNodes();
00102
00104 virtual void GetPointIterator(vtkGenericPointIterator *it);
00105
00107 virtual vtkGenericCellIterator *NewCellIterator();
00108
00110
00114 virtual void GetBoundaryIterator(vtkGenericCellIterator *boundaries,
00115 int dim=-1);
00117
00119
00124 virtual int CountNeighbors(vtkGenericAdaptorCell *boundary);
00125 void CountEdgeNeighbors( int* sharing );
00127
00129
00135 virtual void GetNeighbors(vtkGenericAdaptorCell *boundary,
00136 vtkGenericCellIterator *neighbors);
00138
00140
00144 virtual int FindClosestBoundary(int subId,
00145 double pcoords[3],
00146 vtkGenericCellIterator* &boundary);
00148
00150
00158 virtual int EvaluatePosition(double x[3],
00159 double *closestPoint,
00160 int &subId,
00161 double pcoords[3],
00162 double &dist2);
00164
00166
00170 virtual void EvaluateLocation(int subId,
00171 double pcoords[3],
00172 double x[3]);
00174
00176
00182 virtual void InterpolateTuple(vtkGenericAttribute *a, double pcoords[3],
00183 double *val);
00185
00187
00193 virtual void InterpolateTuple(vtkGenericAttributeCollection *c, double pcoords[3],
00194 double *val);
00195 #if 0
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228 virtual void Contour(vtkContourValues *values,
00229 vtkImplicitFunction *f,
00230 vtkGenericAttributeCollection *attributes,
00231 vtkPointLocator *locator,
00232 vtkCellArray *verts,
00233 vtkCellArray *lines,
00234 vtkCellArray *polys,
00235 vtkPointData *outPd,
00236 vtkCellData *outCd);
00238 #endif
00239 #if 0
00240
00241
00267 virtual void Clip(double value,
00268 vtkImplicitFunction *f,
00269 vtkGenericAttributeCollection *attributes,
00270 vtkGenericCellTessellator *tess,
00271 int insideOut,
00272 vtkPointLocator *locator,
00273 vtkCellArray *connectivity,
00274 vtkPointData *outPd,
00275 vtkCellData *outCd);
00277 #endif
00278
00279
00285 virtual int IntersectWithLine(double p1[3],
00286 double p2[3],
00287 double tol,
00288 double &t,
00289 double x[3],
00290 double pcoords[3],
00291 int &subId);
00293
00295
00304 virtual void Derivatives(int subId,
00305 double pcoords[3],
00306 vtkGenericAttribute *attribute,
00307 double *derivs);
00309
00312 virtual void GetBounds(double bounds[6]);
00313
00317 virtual double *GetBounds();
00318
00321 virtual double GetLength2();
00322
00327 virtual int GetParametricCenter(double pcoords[3]);
00328
00334 virtual double GetParametricDistance(double pcoords[3]);
00335
00337
00345 virtual double *GetParametricCoords();
00346 #if 0
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359 virtual void Tessellate(vtkGenericAttributeCollection *attributes,
00360 vtkPoints *points, vtkCellArray* cellArray,
00361 vtkPointData *pd, vtkCellData* cd);
00363 #endif
00364
00365 virtual int IsFaceOnBoundary(vtkIdType faceId);
00366 virtual int IsOnBoundary();
00367
00369
00371 virtual void GetPointIds(vtkIdType *id);
00372 #if 0
00373 virtual void TriangulateFace(vtkGenericAttributeCollection *attributes,
00374 vtkGenericCellTessellator *tess,
00375 int index,
00376 vtkPoints *pts, vtkCellArray *cellArray,
00377 vtkPointData *pd,
00378 vtkCellData *cd );
00380 #endif
00381
00386 int *GetFaceArray(int faceId);
00387
00392 int GetNumberOfVerticesOnFace(int faceId);
00393
00398 int *GetEdgeArray(int edgeId);
00399
00401
00404 void Init(vtkBridgeDataSet *ds,
00405 vtkIdType cellid);
00407
00409
00411 void InitWithCell(vtkCell *c,
00412 vtkIdType id);
00414
00417 void DeepCopy(vtkBridgeCell *other);
00418
00419 protected:
00420 vtkBridgeCell();
00421 virtual ~vtkBridgeCell();
00422
00425 void AllocateWeights();
00426
00428 void InterpolationFunctions(double pcoords[3]);
00429
00430 friend class vtkBridgeDataSet;
00431 friend class vtkBridgeAttribute;
00432 friend class vtkBridgeCellIterator;
00433 friend class vtkBridgeCellIteratorOnDataSet;
00434 friend class vtkBridgeCellIteratorOne;
00435 friend class vtkBridgeCellIteratorOnCellBoundaries;
00436 friend class vtkBridgePointIteratorOnCell;
00437
00438 vtkCell *Cell;
00439 vtkBridgeDataSet *DataSet;
00440 vtkIdType Id;
00441 int BoolIsInDataSet;
00442 vtkBridgeCellIterator *InternalIterator;
00443
00444 double *Weights;
00445 int WeightsCapacity;
00446
00447 private:
00448 vtkBridgeCell(const vtkBridgeCell&);
00449 void operator=(const vtkBridgeCell&);
00450 };
00451
00452 #endif