Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkGenericCellTessellator Class Reference

#include <vtkGenericCellTessellator.h>

Inheritance diagram for vtkGenericCellTessellator:

Inheritance graph
[legend]
Collaboration diagram for vtkGenericCellTessellator:

Collaboration graph
[legend]
List of all members.

Detailed Description

helper class to perform cell tessellation

vtkGenericCellTessellator is a helper class to perform adaptive tessellation of particular cell topologies. The major purpose for this class is to transform higher-order cell types (e.g., higher-order finite elements) into linear cells that can then be easily visualized by VTK. This class works in conjunction with the vtkGenericDataSet and vtkGenericAdaptorCell classes.

This algorithm is based on edge subdivision. An error metric along each edge is evaluated, and if the error is greater than some tolerance, the edge is subdivided (as well as all connected 2D and 3D cells). The process repeats until the error metric is satisfied.

A significant issue addressed by this algorithm is to insure face compatibility across neigboring cells. That is, diagaonals due to face triangulation must match to insure that the mesh is compatible. The algorithm employs a precomputed table to accelerate the ttessellation process. The table was generated with the help of vtkOrderedTriangulator; the basic idea is that the choice of diagonal is made by considering the relative value of the point ids.

Created by:
  • Bertel, Francois
CVS contributions (if > 5%):
  • Bertel, Francois (99%)
CVS logs (CVSweb):
  • .cxx (/Filtering/vtkGenericCellTessellator.cxx)
  • .h (/Filtering/vtkGenericCellTessellator.h)
Tests:
vtkGenericCellTessellator (Tests)

Definition at line 70 of file vtkGenericCellTessellator.h.

[NOHEADER]

void InsertEdgesIntoEdgeTable (vtkTriangleTile &tri)
void RemoveEdgesFromEdgeTable (vtkTriangleTile &tri)
void InsertPointsIntoEdgeTable (vtkTriangleTile &tri)
vtkGenericEdgeTableEdgeTable

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void Reset ()
void Initialize (vtkIdType numPts)
vtkGenericEdgeTableGetEdgeTable ()
virtual vtkGenericAdaptorCellGetGenericCell ()
virtual void TessellateTriangleFace (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkIdType index, vtkDoubleArray *points, vtkCellArray *cellArray, vtkDoubleArray *scalars)
void Tessellate (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkDoubleArray *scalars)
void Triangulate (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkDoubleArray *scalars)
virtual void SetErrorMetric (vtkGenericSubdivisionErrorMetric *subAlgorithm)
virtual vtkGenericSubdivisionErrorMetricGetErrorMetric ()

Static Public Member Functions

vtkGenericCellTessellatorNew ()
int IsTypeOf (const char *type)
vtkGenericCellTessellatorSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkGenericCellTessellator ()
 ~vtkGenericCellTessellator ()
void InsertEdgesIntoEdgeTable (vtkTetraTile &tetra)
void RemoveEdgesFromEdgeTable (vtkTetraTile &tetra)
void InsertPointsIntoEdgeTable (vtkTetraTile &tetra)
void InternalTessellateTriangle (vtkTriangleTile &root)
int FindEdgeReferenceCount (double p1[3], double p2[3], vtkIdType &e1, vtkIdType &e2)
int GetNumberOfCellsUsingFace (int faceId)
int GetNumberOfCellsUsingEdge (int edgeId)
int IsEdgeOnFace (double p1[3], double p2[3])
int FindEdgeParent2D (double p1[3], double p2[3], int &localId)
int FindEdgeParent (double p1[3], double p2[3], int &localId)

Protected Attributes

vtkGenericAdaptorCellGenericCell
vtkGenericCellIteratorCellIterator
vtkGenericAttributeCollectionAttributeCollection
vtkGenericSubdivisionErrorMetricErrorMetric
double * Scalars
int ScalarsCapacity
vtkDoubleArrayTessellatePoints
vtkCellArrayTessellateCellArray
vtkDoubleArrayTessellateScalars


Member Typedef Documentation

typedef vtkObject vtkGenericCellTessellator::Superclass
 

Reimplemented from vtkObject.

Definition at line 74 of file vtkGenericCellTessellator.h.


Constructor & Destructor Documentation

vtkGenericCellTessellator::vtkGenericCellTessellator  )  [protected]
 

vtkGenericCellTessellator::~vtkGenericCellTessellator  )  [protected]
 


Member Function Documentation

vtkGenericCellTessellator* vtkGenericCellTessellator::New  )  [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkGenericCellTessellator::GetClassName  )  [virtual]
 

Reimplemented from vtkObject.

int vtkGenericCellTessellator::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkGenericCellTessellator::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

vtkGenericCellTessellator* vtkGenericCellTessellator::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkObject.

void vtkGenericCellTessellator::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

virtual vtkGenericAdaptorCell* vtkGenericCellTessellator::GetGenericCell  )  [virtual]
 

Get the higher order cell in order to access the evaluation function.

virtual void vtkGenericCellTessellator::TessellateTriangleFace vtkGenericAdaptorCell cell,
vtkGenericAttributeCollection att,
vtkIdType  index,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkDoubleArray scalars
[virtual]
 

Tessellate a face of a tetrahedron cell. The face is specified by the index value.

Precondition:
cell_exists: cell!=0

is_a_tetra: (cell->GetType()==VTK_TETRA) ||(cell->GetType()==VTK_QUADRATIC_TETRA) ||(cell->GetType()==VTK_HIGHER_ORDER_TETRAHEDRON)

valid_index_range: (index>=0) && (index<4)

void vtkGenericCellTessellator::Tessellate vtkGenericAdaptorCell cell,
vtkGenericAttributeCollection att,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkDoubleArray scalars
 

Tessellate a tetrahedron `cell'. The result is a set of smaller linear cells `cellArray' with `points' and point data `scalars'.

Precondition:
cell_exists: cell!=0

is_a_tetra: (cell->GetType()==VTK_TETRA) ||(cell->GetType()==VTK_QUADRATIC_TETRA) ||(cell->GetType()==VTK_HIGHER_ORDER_TETRAHEDRON)

void vtkGenericCellTessellator::Triangulate vtkGenericAdaptorCell cell,
vtkGenericAttributeCollection att,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkDoubleArray scalars
 

Triangulate a triangle `cell'.

Precondition:
cell_exists: cell!=0

is_a_triangle: (cell->GetType()==VTK_TRIANGLE) ||(cell->GetType()==VTK_QUADRATIC_TRIANGLE) ||(cell->GetType()==VTK_HIGHER_ORDER_TRIANGLE)

virtual void vtkGenericCellTessellator::SetErrorMetric vtkGenericSubdivisionErrorMetric subAlgorithm  )  [virtual]
 

Specify the object to use to compute the error metric.

virtual vtkGenericSubdivisionErrorMetric* vtkGenericCellTessellator::GetErrorMetric  )  [virtual]
 

Specify the object to use to compute the error metric.

void vtkGenericCellTessellator::Reset  ) 
 

Reset the output for repeated use of this class.

void vtkGenericCellTessellator::Initialize vtkIdType  numPts  ) 
 

Initialize the internal hash table.

vtkGenericEdgeTable* vtkGenericCellTessellator::GetEdgeTable  ) 
 

Return the internal edge table.

void vtkGenericCellTessellator::InsertEdgesIntoEdgeTable vtkTriangleTile &  tri  )  [protected]
 

void vtkGenericCellTessellator::RemoveEdgesFromEdgeTable vtkTriangleTile &  tri  )  [protected]
 

void vtkGenericCellTessellator::InsertPointsIntoEdgeTable vtkTriangleTile &  tri  )  [protected]
 

void vtkGenericCellTessellator::InsertEdgesIntoEdgeTable vtkTetraTile &  tetra  )  [protected]
 

void vtkGenericCellTessellator::RemoveEdgesFromEdgeTable vtkTetraTile &  tetra  )  [protected]
 

void vtkGenericCellTessellator::InsertPointsIntoEdgeTable vtkTetraTile &  tetra  )  [protected]
 

void vtkGenericCellTessellator::InternalTessellateTriangle vtkTriangleTile &  root  )  [protected]
 

Internal function used to tessellate a triangle

int vtkGenericCellTessellator::FindEdgeReferenceCount double  p1[3],
double  p2[3],
vtkIdType e1,
vtkIdType e2
[protected]
 

int vtkGenericCellTessellator::GetNumberOfCellsUsingFace int  faceId  )  [protected]
 

int vtkGenericCellTessellator::GetNumberOfCellsUsingEdge int  edgeId  )  [protected]
 

int vtkGenericCellTessellator::IsEdgeOnFace double  p1[3],
double  p2[3]
[protected]
 

Is the edge defined by vertices (`p1',`p2') in parametric coordinates on some edge of the original tetrahedron? If yes return on which edge it is, else return -1.

Precondition:
p1!=p2

p1 and p2 are in bounding box (0,0,0) (1,1,1)

Postcondition:
valid_result: (result==-1) || ( result>=0 && result<=5 )

int vtkGenericCellTessellator::FindEdgeParent2D double  p1[3],
double  p2[3],
int &  localId
[protected]
 

Return 1 if the parent of edge defined by vertices (`p1',`p2') in parametric coordinates, is an edge; 3 if there is no parent (the edge is inside). If the parent is an edge, return its id in `localId'.

Precondition:
p1!=p2

p1 and p2 are in bounding box (0,0,0) (1,1,1)

Postcondition:
valid_result: (result==1)||(result==3)

int vtkGenericCellTessellator::FindEdgeParent double  p1[3],
double  p2[3],
int &  localId
[protected]
 

Return 1 if the parent of edge defined by vertices (`p1',`p2') in parametric coordinates, is an edge; 2 if the parent is a face, 3 if there is no parent (the edge is inside). If the parent is an edge or a face, return its id in `localId'.

Precondition:
p1!=p2

p1 and p2 are in bounding box (0,0,0) (1,1,1)

Postcondition:
valid_result: result>=1 && result<=3


Member Data Documentation

vtkGenericEdgeTable* vtkGenericCellTessellator::EdgeTable [protected]
 

HashTable instead of vtkPointLocator

Definition at line 142 of file vtkGenericCellTessellator.h.

vtkGenericAdaptorCell* vtkGenericCellTessellator::GenericCell [protected]
 

To access the higher order cell from third party library

Definition at line 153 of file vtkGenericCellTessellator.h.

double* vtkGenericCellTessellator::Scalars [protected]
 

Scalar buffer used to save the interpolate values of the attributes The capacity is at least the number of components of the attribute collection ot the current cell.

Definition at line 159 of file vtkGenericCellTessellator.h.

int vtkGenericCellTessellator::ScalarsCapacity [protected]
 

Scalar buffer used to save the interpolate values of the attributes The capacity is at least the number of components of the attribute collection ot the current cell.

Definition at line 160 of file vtkGenericCellTessellator.h.

vtkGenericCellIterator* vtkGenericCellTessellator::CellIterator [protected]
 

Used to iterate over edges boundaries in GetNumberOfCellsUsingEdges()

Definition at line 164 of file vtkGenericCellTessellator.h.

vtkGenericAttributeCollection* vtkGenericCellTessellator::AttributeCollection [protected]
 

To access the higher order field from third party library

Definition at line 167 of file vtkGenericCellTessellator.h.

vtkDoubleArray* vtkGenericCellTessellator::TessellatePoints [protected]
 

To avoid New/Delete

Definition at line 171 of file vtkGenericCellTessellator.h.

vtkCellArray* vtkGenericCellTessellator::TessellateCellArray [protected]
 

To avoid New/Delete

Definition at line 172 of file vtkGenericCellTessellator.h.

vtkDoubleArray* vtkGenericCellTessellator::TessellateScalars [protected]
 

To avoid New/Delete

Definition at line 173 of file vtkGenericCellTessellator.h.

vtkGenericSubdivisionErrorMetric* vtkGenericCellTessellator::ErrorMetric [protected]
 

Contains the error metric

Definition at line 177 of file vtkGenericCellTessellator.h.


The documentation for this class was generated from the following file: