VTK
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 
38 {
39 public:
40  static vtkBridgeCell *New();
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 
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 
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,
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,
259  vtkGenericAttributeCollection *attributes,
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,
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;
426 
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
abstract interface for implicit functions
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
Implementation of vtkGenericCellIterator. It is just an example that show how to implement the Generi...
virtual void GetBoundaryIterator(vtkGenericCellIterator *boundaries, int dim=-1)=0
helper object to manage setting and generating contour values
virtual int GetNumberOfDOFNodes()=0
represent and manipulate point attribute data
Definition: vtkPointData.h:36
virtual int GetNumberOfPoints()=0
helper class to perform cell tessellation
quickly locate points in 3-space
virtual int IsInDataSet()=0
virtual void EvaluateLocation(int subId, double pcoords[3], double x[3])=0
Implementation of vtkGenericAdaptorCell.
Definition: vtkBridgeCell.h:37
#define VTKTESTINGGENERICBRIDGE_EXPORT
virtual void GetNeighbors(vtkGenericAdaptorCell *boundary, vtkGenericCellIterator *neighbors)=0
virtual void Tessellate(vtkGenericAttributeCollection *attributes, vtkGenericCellTessellator *tess, vtkPoints *points, vtkIncrementalPointLocator *locator, vtkCellArray *cellArray, vtkPointData *internalPd, vtkPointData *pd, vtkCellData *cd, vtkUnsignedCharArray *types)
vtkBridgeCellIterator * InternalIterator
virtual int GetParametricCenter(double pcoords[3])=0
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
virtual double * GetBounds()
Iterate over one cell only of a dataset.
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
virtual double GetParametricDistance(double pcoords[3])=0
virtual void InterpolateTuple(vtkGenericAttribute *a, double pcoords[3], double *val)=0
int vtkIdType
Definition: vtkType.h:275
virtual int IsOnBoundary()=0
iterator used to traverse points
abstract class defined API for attribute data
Implementation of vtkGenericDataSet.
iterator used to traverse cells
virtual double * GetParametricCoords()=0
int IsAttributeLinear(vtkGenericAttribute *a)
virtual int GetNumberOfVerticesOnFace(int faceId)=0
defines cell interface
abstract class to specify cell behavior
Definition: vtkCell.h:61
virtual void Clip(double value, vtkImplicitFunction *f, vtkGenericAttributeCollection *attributes, vtkGenericCellTessellator *tess, int insideOut, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *outPd, vtkCellData *outCd, vtkPointData *internalPd, vtkPointData *secondaryPd, vtkCellData *secondaryCd)
virtual int IsFaceOnBoundary(vtkIdType faceId)=0
virtual void CountEdgeNeighbors(int *sharing)=0
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void Derivatives(int subId, double pcoords[3], vtkGenericAttribute *attribute, double *derivs)=0
virtual void GetPointIterator(vtkGenericPointIterator *it)=0
double * Weights
virtual void Contour(vtkContourValues *values, vtkImplicitFunction *f, vtkGenericAttributeCollection *attributes, vtkGenericCellTessellator *tess, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *outPd, vtkCellData *outCd, vtkPointData *internalPd, vtkPointData *secondaryPd, vtkCellData *secondaryCd)
virtual double GetLength2()
vtkIdType Id
virtual int GetType()=0
vtkBridgeDataSet * DataSet
virtual int GetNumberOfBoundaries(int dim=-1)=0
virtual vtkGenericCellIterator * NewCellIterator()=0
Implementation of vtkGenericAttribute.
virtual int GetDimension()=0
virtual int GetAttributeOrder(vtkGenericAttribute *a)=0
virtual void TriangulateFace(vtkGenericAttributeCollection *attributes, vtkGenericCellTessellator *tess, int index, vtkPoints *points, vtkIncrementalPointLocator *locator, vtkCellArray *cellArray, vtkPointData *internalPd, vtkPointData *pd, vtkCellData *cd)
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual int CountNeighbors(vtkGenericAdaptorCell *boundary)=0
Implementation of vtkGenericPointIterator.
virtual int * GetFaceArray(int faceId)=0
virtual void GetPointIds(vtkIdType *id)=0
virtual int IsPrimary()=0
Iterate over cells of a dataset.
virtual int FindClosestBoundary(int subId, double pcoords[3], vtkGenericCellIterator *&boundary)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2)=0
vtkCell * Cell
static vtkObject * New()
virtual int GetGeometryOrder()=0
virtual int * GetEdgeArray(int edgeId)=0
virtual vtkIdType GetId()=0
represent and manipulate 3D points
Definition: vtkPoints.h:38
void PrintSelf(ostream &os, vtkIndent indent)