VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkBridgeCell.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBridgeCell.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 =========================================================================*/
27 #ifndef __vtkBridgeCell_h
28 #define __vtkBridgeCell_h
29 
30 #include "vtkBridgeExport.h" //for module export macro
31 #include "vtkGenericAdaptorCell.h"
32 
33 class vtkCell;
34 class vtkBridgeDataSet;
36 
37 class VTKTESTINGGENERICBRIDGE_EXPORT vtkBridgeCell : public vtkGenericAdaptorCell
38 {
39 public:
40  static vtkBridgeCell *New();
41  vtkTypeMacro(vtkBridgeCell,vtkGenericAdaptorCell);
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
46  virtual vtkIdType GetId();
47 
49  virtual int IsInDataSet();
50 
54  virtual int GetType();
55 
58  virtual int GetDimension();
59 
61  virtual int GetGeometryOrder();
62 
65  int IsGeometryLinear();
66 
69  virtual int GetAttributeOrder(vtkGenericAttribute *a);
70 
74  int IsAttributeLinear(vtkGenericAttribute *a);
75 
77  virtual int IsPrimary();
78 
81  virtual int GetNumberOfPoints();
82 
91  virtual int GetNumberOfBoundaries(int dim=-1);
92 
101  virtual int GetNumberOfDOFNodes();
102 
104  virtual void GetPointIterator(vtkGenericPointIterator *it);
105 
107  virtual vtkGenericCellIterator *NewCellIterator();
108 
110 
114  virtual void GetBoundaryIterator(vtkGenericCellIterator *boundaries,
115  int dim=-1);
117 
119 
124  virtual int CountNeighbors(vtkGenericAdaptorCell *boundary);
125  void CountEdgeNeighbors( int* sharing );
127 
129 
135  virtual void GetNeighbors(vtkGenericAdaptorCell *boundary,
136  vtkGenericCellIterator *neighbors);
138 
140 
144  virtual int FindClosestBoundary(int subId,
145  double pcoords[3],
146  vtkGenericCellIterator* &boundary);
148 
150 
158  virtual int EvaluatePosition(double x[3],
159  double *closestPoint,
160  int &subId,
161  double pcoords[3],
162  double &dist2);
164 
166 
170  virtual void EvaluateLocation(int subId,
171  double pcoords[3],
172  double x[3]);
174 
176 
182  virtual void InterpolateTuple(vtkGenericAttribute *a, double pcoords[3],
183  double *val);
185 
187 
193  virtual void InterpolateTuple(vtkGenericAttributeCollection *c, double pcoords[3],
194  double *val);
195 #if 0
196 
197 
198 
218  virtual void Contour(vtkContourValues *values,
219  vtkImplicitFunction *f,
220  vtkGenericAttributeCollection *attributes,
221  vtkPointLocator *locator,
222  vtkCellArray *verts,
223  vtkCellArray *lines,
224  vtkCellArray *polys,
225  vtkPointData *outPd,
226  vtkCellData *outCd);
227 #endif
228 #if 0
229 
230 
231 
257  virtual void Clip(double value,
258  vtkImplicitFunction *f,
259  vtkGenericAttributeCollection *attributes,
260  vtkGenericCellTessellator *tess,
261  int insideOut,
262  vtkPointLocator *locator,
263  vtkCellArray *connectivity,
264  vtkPointData *outPd,
265  vtkCellData *outCd);
266 #endif
267 
268 
269 
275  virtual int IntersectWithLine(double p1[3],
276  double p2[3],
277  double tol,
278  double &t,
279  double x[3],
280  double pcoords[3],
281  int &subId);
283 
285 
294  virtual void Derivatives(int subId,
295  double pcoords[3],
296  vtkGenericAttribute *attribute,
297  double *derivs);
299 
302  virtual void GetBounds(double bounds[6]);
303 
307  virtual double *GetBounds();
308 
311  virtual double GetLength2();
312 
317  virtual int GetParametricCenter(double pcoords[3]);
318 
324  virtual double GetParametricDistance(double pcoords[3]);
325 
327 
335  virtual double *GetParametricCoords();
336 #if 0
337 
338 
339 
348  virtual void Tessellate(vtkGenericAttributeCollection *attributes,
349  vtkPoints *points, vtkCellArray* cellArray,
350  vtkPointData *pd, vtkCellData* cd);
351 #endif
352  // For the internals of the tesselation algorithm (the hash table in particular)
353  virtual int IsFaceOnBoundary(vtkIdType faceId);
354  virtual int IsOnBoundary();
356 
358 
360  virtual void GetPointIds(vtkIdType *id);
361 #if 0
362  virtual void TriangulateFace(vtkGenericAttributeCollection *attributes,
363  vtkGenericCellTessellator *tess,
364  int index,
365  vtkPoints *pts, vtkCellArray *cellArray,
366  vtkPointData *pd,
367  vtkCellData *cd );
368 #endif
369 
370 
375  int *GetFaceArray(int faceId);
376 
381  int GetNumberOfVerticesOnFace(int faceId);
382 
387  int *GetEdgeArray(int edgeId);
388 
390 
393  void Init(vtkBridgeDataSet *ds,
394  vtkIdType cellid);
396 
398 
400  void InitWithCell(vtkCell *c,
401  vtkIdType id);
403 
406  void DeepCopy(vtkBridgeCell *other);
407 
408 protected:
409  vtkBridgeCell();
410  virtual ~vtkBridgeCell();
411 
414  void AllocateWeights();
415 
417  void InterpolationFunctions(double pcoords[3], double *weights);
418 
419  friend class vtkBridgeDataSet;
420  friend class vtkBridgeAttribute;
421  friend class vtkBridgeCellIterator;
424  friend class vtkBridgeCellIteratorOnCellBoundaries;
426 
427  vtkCell *Cell;
429  vtkIdType Id; // what does it mean for boundary cells?
432 
433  double *Weights; // interpolation functions
435 
436 private:
437  vtkBridgeCell(const vtkBridgeCell&); // Not implemented.
438  void operator=(const vtkBridgeCell&); // Not implemented.
439 };
440 
441 #endif
Implementation of vtkGenericCellIterator. It is just an example that show how to implement the Generi...
Implementation of vtkGenericAdaptorCell.
Definition: vtkBridgeCell.h:37
vtkBridgeCellIterator * InternalIterator
Iterate over one cell only of a dataset.
Implementation of vtkGenericDataSet.
double * Weights
vtkIdType Id
vtkBridgeDataSet * DataSet
Implementation of vtkGenericPointIterator.
Iterate over cells of a dataset.
vtkCell * Cell