VTK
|
helper class to perform cell tessellation More...
#include <vtkSimpleCellTessellator.h>
Public Types | |
typedef vtkGenericCellTessellator | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkSimpleCellTessellator * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Reset () |
void | Initialize (vtkGenericDataSet *ds) |
int | GetFixedSubdivisions () |
int | GetMaxSubdivisionLevel () |
int | GetMaxAdaptiveSubdivisions () |
void | SetFixedSubdivisions (int level) |
void | SetMaxSubdivisionLevel (int level) |
virtual vtkGenericAdaptorCell * | GetGenericCell () |
void | TessellateFace (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkIdType index, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd) |
void | Tessellate (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd) |
void | Triangulate (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd) |
void | SetSubdivisionLevels (int fixed, int maxLevel) |
![]() | |
vtkGenericCellTessellator * | NewInstance () const |
void | InitErrorMetrics (vtkGenericDataSet *ds) |
void | GetMaxErrors (double *errors) |
virtual void | SetErrorMetrics (vtkCollection *someErrorMetrics) |
virtual vtkCollection * | GetErrorMetrics () |
virtual int | GetMeasurement () |
virtual void | SetMeasurement (int) |
![]() | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static vtkSimpleCellTessellator * | New () |
static int | IsTypeOf (const char *type) |
static vtkSimpleCellTessellator * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkGenericCellTessellator * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Friends | |
class | vtkTetraTile |
class | vtkTriangleTile |
helper class to perform cell tessellation
vtkSimpleCellTessellator 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. Since the algorithm is based on edge subdivision it inherently avoid T-junctions.
A significant issue addressed by this algorithm is to insure face compatibility across neigboring cells. That is, diagonals due to face triangulation must match to insure that the mesh is compatible. The algorithm employs a precomputed table to accelerate the tessellation process. The table was generated with the help of vtkOrderedTriangulator the basic idea is that the choice of diagonal is made only by considering the relative value of the point ids.
Definition at line 70 of file vtkSimpleCellTessellator.h.
Definition at line 74 of file vtkSimpleCellTessellator.h.
|
protected |
|
protected |
|
static |
|
static |
|
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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkGenericCellTessellator.
|
static |
|
protectedvirtual |
Reimplemented from vtkGenericCellTessellator.
vtkSimpleCellTessellator* vtkSimpleCellTessellator::NewInstance | ( | ) | const |
|
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 vtkGenericCellTessellator.
|
virtual |
Get the higher order cell in order to access the evaluation function.
|
virtual |
Tessellate a face of a 3D `cell'. The face is specified by the index value. The result is a set of smaller linear triangles in `cellArray' with `points' and point data `internalPd'.
Implements vtkGenericCellTessellator.
|
virtual |
Tessellate a 3D `cell'. The result is a set of smaller linear tetrahedra in `cellArray' with `points' and point data `internalPd'.
Implements vtkGenericCellTessellator.
|
virtual |
Triangulate a 2D `cell'. The result is a set of smaller linear triangles in `cellArray' with `points' and point data `internalPd'.
Implements vtkGenericCellTessellator.
void vtkSimpleCellTessellator::Reset | ( | ) |
Reset the output for repeated use of this class.
|
virtual |
Initialize the tessellator with a data set `ds'.
Implements vtkGenericCellTessellator.
int vtkSimpleCellTessellator::GetFixedSubdivisions | ( | ) |
Return the number of fixed subdivisions. It is used to prevent from infinite loop in degenerated cases. For order 3 or higher, if the inflection point is exactly on the mid-point, error metric will not detect that a subdivision is required. 0 means no fixed subdivision: there will be only adaptive subdivisions. The algorithm first performs `GetFixedSubdivisions' non adaptive subdivisions followed by at most `GetMaxAdaptiveSubdivisions' adaptive subdivisions. Hence, there are at most `GetMaxSubdivisionLevel' subdivisions.
int vtkSimpleCellTessellator::GetMaxSubdivisionLevel | ( | ) |
Return the maximum level of subdivision. It is used to prevent from infinite loop in degenerated cases. For order 3 or higher, if the inflection point is exactly on the mid-point, error metric will not detect that a subdivision is required. 0 means no subdivision, neither fixed nor adaptive.
int vtkSimpleCellTessellator::GetMaxAdaptiveSubdivisions | ( | ) |
Return the maximum number of adaptive subdivisions.
void vtkSimpleCellTessellator::SetFixedSubdivisions | ( | int | level | ) |
Set the number of fixed subdivisions. See GetFixedSubdivisions() for more explanations.
void vtkSimpleCellTessellator::SetMaxSubdivisionLevel | ( | int | level | ) |
Set the maximum level of subdivision. See GetMaxSubdivisionLevel() for more explanations.
Set both the number of fixed subdivisions and the maximum level of subdivisions. See GetFixedSubdivisions(), GetMaxSubdivisionLevel() and GetMaxAdaptiveSubdivisions() for more explanations.
|
protected |
Extract point `pointId' from the edge table to the output point and output point data.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Initialize `root' with the sub-tetra defined by the `localIds' points on the complex cell, `ids' are the global ids over the mesh of those points. The sub-tetra is also defined by the ids of its edges and of its faces relative to the complex cell. -1 means that the edge or the face of the sub-tetra is not an original edge or face of the complex cell.
|
protected |
Triangulate a triangle of `cell'. This triangle can be the top-level triangle if the cell is a triangle or a toplevel sub-triangle is the cell is a polygon, or a triangular face of a 3D cell or a top-level sub-triangle of a face of a 3D cell if the face is not a triangle. Arguments `localIds', `ids' and `edgeIds' have the same meaning than for InitTetraTile.
|
protected |
Allocate some memory if Scalars does not exists or is smaller than size.
|
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.
|
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'.
|
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'.
|
protected |
Allocate some memory if PointIds does not exist or is smaller than size.
Are the faces `originalFace' and `face' equal? The result is independent from any order or orientation.
|
friend |
Definition at line 354 of file vtkSimpleCellTessellator.h.
|
friend |
Definition at line 355 of file vtkSimpleCellTessellator.h.
|
protected |
HashTable instead of vtkPointLocator
Definition at line 189 of file vtkSimpleCellTessellator.h.
|
protected |
To access the higher order cell from third party library
Definition at line 237 of file vtkSimpleCellTessellator.h.
|
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 253 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 254 of file vtkSimpleCellTessellator.h.
|
protected |
Number of double value to skip to go to the next point into Scalars array It is 6+attributeCollection->GetNumberOfComponents()
Definition at line 258 of file vtkSimpleCellTessellator.h.
|
protected |
Used to iterate over edges boundaries in GetNumberOfCellsUsingEdges()
Definition at line 261 of file vtkSimpleCellTessellator.h.
|
protected |
To access the higher order field from third party library
Definition at line 264 of file vtkSimpleCellTessellator.h.
|
protected |
To avoid New/Delete
Definition at line 268 of file vtkSimpleCellTessellator.h.
|
protected |
To avoid New/Delete
Definition at line 269 of file vtkSimpleCellTessellator.h.
|
protected |
To avoid New/Delete
Definition at line 270 of file vtkSimpleCellTessellator.h.
|
protected |
Dataset to be tessellated.
Definition at line 314 of file vtkSimpleCellTessellator.h.
|
protected |
Number of points in the dataset to be tessellated.
Definition at line 317 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 319 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 320 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 321 of file vtkSimpleCellTessellator.h.
|
protected |
For each edge (6) of the sub-tetra, there is the id of the original edge or -1 if the edge is not an original edge
Definition at line 325 of file vtkSimpleCellTessellator.h.
|
protected |
For each face (4) of the sub-tetra, there is the id of the original face or -1 if the face is not an original face
Definition at line 328 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 334 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 338 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 341 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 344 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 346 of file vtkSimpleCellTessellator.h.
|
protected |
Definition at line 347 of file vtkSimpleCellTessellator.h.