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 vtkTypeMacro(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);
00237 #endif
00238 #if 0
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276 virtual void Clip(double value,
00277 vtkImplicitFunction *f,
00278 vtkGenericAttributeCollection *attributes,
00279 vtkGenericCellTessellator *tess,
00280 int insideOut,
00281 vtkPointLocator *locator,
00282 vtkCellArray *connectivity,
00283 vtkPointData *outPd,
00284 vtkCellData *outCd);
00285 #endif
00286
00287
00288
00289
00290
00291
00292
00293 virtual int IntersectWithLine(double p1[3],
00294 double p2[3],
00295 double tol,
00296 double &t,
00297 double x[3],
00298 double pcoords[3],
00299 int &subId);
00301
00303
00312 virtual void Derivatives(int subId,
00313 double pcoords[3],
00314 vtkGenericAttribute *attribute,
00315 double *derivs);
00317
00320 virtual void GetBounds(double bounds[6]);
00321
00325 virtual double *GetBounds();
00326
00329 virtual double GetLength2();
00330
00335 virtual int GetParametricCenter(double pcoords[3]);
00336
00342 virtual double GetParametricDistance(double pcoords[3]);
00343
00345
00353 virtual double *GetParametricCoords();
00354 #if 0
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367 virtual void Tessellate(vtkGenericAttributeCollection *attributes,
00368 vtkPoints *points, vtkCellArray* cellArray,
00369 vtkPointData *pd, vtkCellData* cd);
00370 #endif
00371
00372 virtual int IsFaceOnBoundary(vtkIdType faceId);
00373 virtual int IsOnBoundary();
00375
00377
00379 virtual void GetPointIds(vtkIdType *id);
00380 #if 0
00381 virtual void TriangulateFace(vtkGenericAttributeCollection *attributes,
00382 vtkGenericCellTessellator *tess,
00383 int index,
00384 vtkPoints *pts, vtkCellArray *cellArray,
00385 vtkPointData *pd,
00386 vtkCellData *cd );
00387 #endif
00388
00389
00394 int *GetFaceArray(int faceId);
00395
00400 int GetNumberOfVerticesOnFace(int faceId);
00401
00406 int *GetEdgeArray(int edgeId);
00407
00409
00412 void Init(vtkBridgeDataSet *ds,
00413 vtkIdType cellid);
00415
00417
00419 void InitWithCell(vtkCell *c,
00420 vtkIdType id);
00422
00425 void DeepCopy(vtkBridgeCell *other);
00426
00427 protected:
00428 vtkBridgeCell();
00429 virtual ~vtkBridgeCell();
00430
00433 void AllocateWeights();
00434
00436 void InterpolationFunctions(double pcoords[3], double *weights);
00437
00438 friend class vtkBridgeDataSet;
00439 friend class vtkBridgeAttribute;
00440 friend class vtkBridgeCellIterator;
00441 friend class vtkBridgeCellIteratorOnDataSet;
00442 friend class vtkBridgeCellIteratorOne;
00443 friend class vtkBridgeCellIteratorOnCellBoundaries;
00444 friend class vtkBridgePointIteratorOnCell;
00445
00446 vtkCell *Cell;
00447 vtkBridgeDataSet *DataSet;
00448 vtkIdType Id;
00449 int BoolIsInDataSet;
00450 vtkBridgeCellIterator *InternalIterator;
00451
00452 double *Weights;
00453 int WeightsCapacity;
00454
00455 private:
00456 vtkBridgeCell(const vtkBridgeCell&);
00457 void operator=(const vtkBridgeCell&);
00458 };
00459
00460 #endif