VTK  9.3.20240419
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkSimpleCellTessellator Class Reference

helper class to perform cell tessellation More...

#include <vtkSimpleCellTessellator.h>

Inheritance diagram for vtkSimpleCellTessellator:
[legend]
Collaboration diagram for vtkSimpleCellTessellator:
[legend]

Public Types

typedef vtkGenericCellTessellator Superclass
 
- Public Types inherited from vtkGenericCellTessellator
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkSimpleCellTessellatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void TessellateFace (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkIdType index, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd) override
 Tessellate a face of a 3D ‘cell’. More...
 
void Tessellate (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd) override
 Tessellate a 3D ‘cell’. More...
 
void Triangulate (vtkGenericAdaptorCell *cell, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd) override
 Triangulate a 2D ‘cell’. More...
 
void Reset ()
 Reset the output for repeated use of this class. More...
 
void Initialize (vtkGenericDataSet *ds) override
 Initialize the tessellator with a data set ‘ds’. More...
 
int GetFixedSubdivisions ()
 Return the number of fixed subdivisions. More...
 
int GetMaxSubdivisionLevel ()
 Return the maximum level of subdivision. More...
 
int GetMaxAdaptiveSubdivisions ()
 Return the maximum number of adaptive subdivisions. More...
 
void SetFixedSubdivisions (int level)
 Set the number of fixed subdivisions. More...
 
void SetMaxSubdivisionLevel (int level)
 Set the maximum level of subdivision. More...
 
void SetSubdivisionLevels (int fixed, int maxLevel)
 Set both the number of fixed subdivisions and the maximum level of subdivisions. More...
 
virtual vtkGenericAdaptorCellGetGenericCell ()
 Get the higher order cell in order to access the evaluation function. More...
 
- Public Member Functions inherited from vtkGenericCellTessellator
vtkGenericCellTessellatorNewInstance () const
 
void InitErrorMetrics (vtkGenericDataSet *ds)
 Init the error metric with the dataset. More...
 
void GetMaxErrors (double *errors)
 Get the maximum error measured after the fixed subdivision. More...
 
virtual void SetErrorMetrics (vtkCollection *someErrorMetrics)
 Specify the list of error metrics used to decide if an edge has to be split or not. More...
 
virtual vtkCollectionGetErrorMetrics ()
 Specify the list of error metrics used to decide if an edge has to be split or not. More...
 
virtual int GetMeasurement ()
 If true, measure the quality of the fixed subdivision. More...
 
virtual void SetMeasurement (int)
 If true, measure the quality of the fixed subdivision. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output. More...
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes. More...
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not. More...
 

Static Public Member Functions

static vtkSimpleCellTessellatorNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkSimpleCellTessellatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkGenericCellTessellator
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkGenericCellTessellatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkSimpleCellTessellator ()
 
 ~vtkSimpleCellTessellator () override
 
void CopyPoint (vtkIdType pointId)
 Extract point ‘pointId’ from the edge table to the output point and output point data. More...
 
void InsertEdgesIntoEdgeTable (vtkTriangleTile &tri)
 
void RemoveEdgesFromEdgeTable (vtkTriangleTile &tri)
 
void InsertPointsIntoEdgeTable (vtkTriangleTile &tri)
 
void InsertEdgesIntoEdgeTable (vtkTetraTile &tetra)
 
void RemoveEdgesFromEdgeTable (vtkTetraTile &tetra)
 
void InitTetraTile (vtkTetraTile &root, const vtkIdType *localIds, vtkIdType *ids, int *edgeIds, int *faceIds)
 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. More...
 
void TriangulateTriangle (vtkGenericAdaptorCell *cell, vtkIdType *localIds, vtkIdType *ids, const vtkIdType *edgeIds, vtkGenericAttributeCollection *att, vtkDoubleArray *points, vtkCellArray *cellArray, vtkPointData *internalPd)
 Triangulate a triangle of ‘cell’. More...
 
void AllocateScalars (int size)
 Allocate some memory if Scalars does not exists or is smaller than size. More...
 
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])
 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. More...
 
int FindEdgeParent2D (double p1[3], double p2[3], int &localId)
 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). More...
 
int FindEdgeParent (double p1[3], double p2[3], int &localId)
 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). More...
 
void AllocatePointIds (int size)
 Allocate some memory if PointIds does not exist or is smaller than size. More...
 
int FacesAreEqual (const vtkIdType *originalFace, const vtkIdType face[3])
 Are the faces ‘originalFace’ and ‘face’ equal? The result is independent from any order or orientation. More...
 
- Protected Member Functions inherited from vtkGenericCellTessellator
 vtkGenericCellTessellator ()
 
 ~vtkGenericCellTessellator () override
 
int RequiresEdgeSubdivision (double *left, double *mid, double *right, double alpha)
 Does the edge need to be subdivided according to at least one error metric? The edge is defined by its ‘leftPoint’ and its ‘rightPoint’. More...
 
virtual void UpdateMaxError (double *leftPoint, double *midPoint, double *rightPoint, double alpha)
 Update the max error of each error metric according to the error at the mid-point. More...
 
void ResetMaxErrors ()
 Reset the maximal error of each error metric. More...
 
void SetGenericCell (vtkGenericAdaptorCell *cell)
 Send the current cell to error metrics. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkGenericEdgeTableEdgeTable
 HashTable instead of vtkPointLocator. More...
 
vtkGenericAdaptorCellGenericCell
 To access the higher order cell from third party library. More...
 
double * Scalars
 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. More...
 
int ScalarsCapacity
 
int PointOffset
 Number of double value to skip to go to the next point into Scalars array It is 6+attributeCollection->GetNumberOfComponents() More...
 
vtkGenericCellIteratorCellIterator
 Used to iterate over edges boundaries in GetNumberOfCellsUsingEdges() More...
 
vtkGenericAttributeCollectionAttributeCollection
 To access the higher order field from third party library. More...
 
vtkIdType NumberOfPoints
 Number of points in the dataset to be tessellated. More...
 
int FixedSubdivisions
 
int MaxSubdivisionLevel
 
int CurrentSubdivisionLevel
 
const vtkIdTypeEdgeIds
 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. More...
 
const vtkIdTypeFaceIds
 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. More...
 
vtkOrderedTriangulatorTriangulator
 
vtkCellArrayConnectivity
 
vtkPolygonPolygon
 
vtkIdListTriangleIds
 
vtkIdTypePointIds
 
int PointIdsCapacity
 
vtkDoubleArrayTessellatePoints
 To avoid New/Delete. More...
 
vtkCellArrayTessellateCellArray
 To avoid New/Delete. More...
 
vtkPointDataTessellatePointData
 To avoid New/Delete. More...
 
- Protected Attributes inherited from vtkGenericCellTessellator
vtkCollectionErrorMetrics
 List of error metrics. More...
 
vtkGenericDataSetDataSet
 Dataset to be tessellated. More...
 
int Measurement
 
double * MaxErrors
 
int MaxErrorsCapacity
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkTetraTile
 
class vtkTriangleTile
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

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 ensure face compatibility across neighboring cells. That is, diagonals due to face triangulation must match to ensure 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.

See also
vtkGenericCellTessellator vtkGenericSubdivisionErrorMetric vtkAttributesErrorMetric vtkGeometricErrorMetric vtkViewDependentErrorMetric
Tests:
vtkSimpleCellTessellator (Tests)

Definition at line 60 of file vtkSimpleCellTessellator.h.

Member Typedef Documentation

◆ Superclass

Definition at line 64 of file vtkSimpleCellTessellator.h.

Constructor & Destructor Documentation

◆ vtkSimpleCellTessellator()

vtkSimpleCellTessellator::vtkSimpleCellTessellator ( )
protected

◆ ~vtkSimpleCellTessellator()

vtkSimpleCellTessellator::~vtkSimpleCellTessellator ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkSimpleCellTessellator* vtkSimpleCellTessellator::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkSimpleCellTessellator::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkSimpleCellTessellator::IsA ( const char *  name)
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.

◆ SafeDownCast()

static vtkSimpleCellTessellator* vtkSimpleCellTessellator::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkSimpleCellTessellator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkGenericCellTessellator.

◆ NewInstance()

vtkSimpleCellTessellator* vtkSimpleCellTessellator::NewInstance ( ) const

◆ PrintSelf()

void vtkSimpleCellTessellator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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.

◆ GetGenericCell()

virtual vtkGenericAdaptorCell* vtkSimpleCellTessellator::GetGenericCell ( )
virtual

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

◆ TessellateFace()

void vtkSimpleCellTessellator::TessellateFace ( vtkGenericAdaptorCell cell,
vtkGenericAttributeCollection att,
vtkIdType  index,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkPointData internalPd 
)
overridevirtual

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’.

Precondition
cell_exists: cell!=0
valid_dimension: cell->GetDimension()==3
valid_index_range: (index>=0) && (index<cell->GetNumberOfBoundaries(2))
att_exists: att!=0
points_exists: points!=0
cellArray_exists: cellArray!=0
internalPd_exists: internalPd!=0

Implements vtkGenericCellTessellator.

◆ Tessellate()

void vtkSimpleCellTessellator::Tessellate ( vtkGenericAdaptorCell cell,
vtkGenericAttributeCollection att,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkPointData internalPd 
)
overridevirtual

Tessellate a 3D ‘cell’.

The result is a set of smaller linear tetrahedra in ‘cellArray’ with ‘points’ and point data ‘internalPd’.

Precondition
cell_exists: cell!=0
valid_dimension: cell->GetDimension()==3
att_exists: att!=0
points_exists: points!=0
cellArray_exists: cellArray!=0
internalPd_exists: internalPd!=0

Implements vtkGenericCellTessellator.

◆ Triangulate()

void vtkSimpleCellTessellator::Triangulate ( vtkGenericAdaptorCell cell,
vtkGenericAttributeCollection att,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkPointData internalPd 
)
overridevirtual

Triangulate a 2D ‘cell’.

The result is a set of smaller linear triangles in ‘cellArray’ with ‘points’ and point data ‘internalPd’.

Precondition
cell_exists: cell!=0
valid_dimension: cell->GetDimension()==2
att_exists: att!=0
points_exists: points!=0
cellArray_exists: cellArray!=0
internalPd_exists: internalPd!=0

Implements vtkGenericCellTessellator.

◆ Reset()

void vtkSimpleCellTessellator::Reset ( )

Reset the output for repeated use of this class.

◆ Initialize()

void vtkSimpleCellTessellator::Initialize ( vtkGenericDataSet ds)
overridevirtual

Initialize the tessellator with a data set ‘ds’.

Implements vtkGenericCellTessellator.

◆ GetFixedSubdivisions()

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.

Postcondition
positive_result: result>=0 && result<=GetMaxSubdivisionLevel()

◆ GetMaxSubdivisionLevel()

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.

Postcondition
positive_result: result>=GetFixedSubdivisions()

◆ GetMaxAdaptiveSubdivisions()

int vtkSimpleCellTessellator::GetMaxAdaptiveSubdivisions ( )

Return the maximum number of adaptive subdivisions.

Postcondition
valid_result: result==GetMaxSubdivisionLevel()-GetFixedSubdivisions()

◆ SetFixedSubdivisions()

void vtkSimpleCellTessellator::SetFixedSubdivisions ( int  level)

Set the number of fixed subdivisions.

See GetFixedSubdivisions() for more explanations.

Precondition
positive_level: level>=0 && level<=GetMaxSubdivisionLevel()
Postcondition
is_set: GetFixedSubdivisions()==level

◆ SetMaxSubdivisionLevel()

void vtkSimpleCellTessellator::SetMaxSubdivisionLevel ( int  level)

Set the maximum level of subdivision.

See GetMaxSubdivisionLevel() for more explanations.

Precondition
positive_level: level>=GetFixedSubdivisions()
Postcondition
is_set: level==GetMaxSubdivisionLevel()

◆ SetSubdivisionLevels()

void vtkSimpleCellTessellator::SetSubdivisionLevels ( int  fixed,
int  maxLevel 
)

Set both the number of fixed subdivisions and the maximum level of subdivisions.

See GetFixedSubdivisions(), GetMaxSubdivisionLevel() and GetMaxAdaptiveSubdivisions() for more explanations.

Precondition
positive_fixed: fixed>=0
valid_range: fixed<=maxLevel
Postcondition
fixed_is_set: fixed==GetFixedSubdivisions()
maxLevel_is_set: maxLevel==GetMaxSubdivisionLevel()

◆ CopyPoint()

void vtkSimpleCellTessellator::CopyPoint ( vtkIdType  pointId)
protected

Extract point ‘pointId’ from the edge table to the output point and output point data.

◆ InsertEdgesIntoEdgeTable() [1/2]

void vtkSimpleCellTessellator::InsertEdgesIntoEdgeTable ( vtkTriangleTile tri)
protected

◆ RemoveEdgesFromEdgeTable() [1/2]

void vtkSimpleCellTessellator::RemoveEdgesFromEdgeTable ( vtkTriangleTile tri)
protected

◆ InsertPointsIntoEdgeTable()

void vtkSimpleCellTessellator::InsertPointsIntoEdgeTable ( vtkTriangleTile tri)
protected

◆ InsertEdgesIntoEdgeTable() [2/2]

void vtkSimpleCellTessellator::InsertEdgesIntoEdgeTable ( vtkTetraTile tetra)
protected

◆ RemoveEdgesFromEdgeTable() [2/2]

void vtkSimpleCellTessellator::RemoveEdgesFromEdgeTable ( vtkTetraTile tetra)
protected

◆ InitTetraTile()

void vtkSimpleCellTessellator::InitTetraTile ( vtkTetraTile root,
const vtkIdType localIds,
vtkIdType ids,
int *  edgeIds,
int *  faceIds 
)
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.

Precondition
cell_exists: this->GenericCell!=0
localIds_exists: localIds!=0
localIds_size: sizeof(localIds)==4
ids_exists: ids!=0
ids_size: sizeof(ids)==4
edgeIds_exists: edgeIds!=0
edgeIds_size: sizeof(edgeIds)==6
faceIds_exists: faceIds!=0
faceIds_size: sizeof(faceIds)==4

◆ TriangulateTriangle()

void vtkSimpleCellTessellator::TriangulateTriangle ( vtkGenericAdaptorCell cell,
vtkIdType localIds,
vtkIdType ids,
const vtkIdType edgeIds,
vtkGenericAttributeCollection att,
vtkDoubleArray points,
vtkCellArray cellArray,
vtkPointData internalPd 
)
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.

Precondition
cell_exists: cell!=0
localIds_exists: localIds!=0
localIds_size: sizeof(localIds)==3
ids_exists: ids!=0
ids_size: sizeof(ids)==3
edgeIds_exists: edgeIds!=0
edgeIds_size: sizeof(edgeIds)==3
Note
Parameter edgeIds's type changed to match new vtkCell API. This API change could not be smoothly done by deprecation.

◆ AllocateScalars()

void vtkSimpleCellTessellator::AllocateScalars ( int  size)
protected

Allocate some memory if Scalars does not exists or is smaller than size.

Precondition
positive_size: size>0

◆ FindEdgeReferenceCount()

int vtkSimpleCellTessellator::FindEdgeReferenceCount ( double  p1[3],
double  p2[3],
vtkIdType e1,
vtkIdType e2 
)
protected

◆ GetNumberOfCellsUsingFace()

int vtkSimpleCellTessellator::GetNumberOfCellsUsingFace ( int  faceId)
protected

◆ GetNumberOfCellsUsingEdge()

int vtkSimpleCellTessellator::GetNumberOfCellsUsingEdge ( int  edgeId)
protected

◆ IsEdgeOnFace()

int vtkSimpleCellTessellator::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 )

◆ FindEdgeParent2D()

int vtkSimpleCellTessellator::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)

◆ FindEdgeParent()

int vtkSimpleCellTessellator::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

◆ AllocatePointIds()

void vtkSimpleCellTessellator::AllocatePointIds ( int  size)
protected

Allocate some memory if PointIds does not exist or is smaller than size.

Precondition
positive_size: size>0

◆ FacesAreEqual()

int vtkSimpleCellTessellator::FacesAreEqual ( const vtkIdType originalFace,
const vtkIdType  face[3] 
)
protected

Are the faces ‘originalFace’ and ‘face’ equal? The result is independent from any order or orientation.

Precondition
originalFace_exists: originalFace!=0
Note
Parameter originalFace and face types changed to match new vtkCell API. This API change could not be smoothly done by deprecation.

Friends And Related Function Documentation

◆ vtkTetraTile

friend class vtkTetraTile
friend

Definition at line 394 of file vtkSimpleCellTessellator.h.

◆ vtkTriangleTile

friend class vtkTriangleTile
friend

Definition at line 395 of file vtkSimpleCellTessellator.h.

Member Data Documentation

◆ EdgeTable

vtkGenericEdgeTable* vtkSimpleCellTessellator::EdgeTable
protected

HashTable instead of vtkPointLocator.

Definition at line 198 of file vtkSimpleCellTessellator.h.

◆ GenericCell

vtkGenericAdaptorCell* vtkSimpleCellTessellator::GenericCell
protected

To access the higher order cell from third party library.

Definition at line 251 of file vtkSimpleCellTessellator.h.

◆ Scalars

double* vtkSimpleCellTessellator::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 271 of file vtkSimpleCellTessellator.h.

◆ ScalarsCapacity

int vtkSimpleCellTessellator::ScalarsCapacity
protected

Definition at line 272 of file vtkSimpleCellTessellator.h.

◆ PointOffset

int vtkSimpleCellTessellator::PointOffset
protected

Number of double value to skip to go to the next point into Scalars array It is 6+attributeCollection->GetNumberOfComponents()

Definition at line 278 of file vtkSimpleCellTessellator.h.

◆ CellIterator

vtkGenericCellIterator* vtkSimpleCellTessellator::CellIterator
protected

Used to iterate over edges boundaries in GetNumberOfCellsUsingEdges()

Definition at line 283 of file vtkSimpleCellTessellator.h.

◆ AttributeCollection

vtkGenericAttributeCollection* vtkSimpleCellTessellator::AttributeCollection
protected

To access the higher order field from third party library.

Definition at line 288 of file vtkSimpleCellTessellator.h.

◆ TessellatePoints

vtkDoubleArray* vtkSimpleCellTessellator::TessellatePoints
protected

To avoid New/Delete.

Definition at line 294 of file vtkSimpleCellTessellator.h.

◆ TessellateCellArray

vtkCellArray* vtkSimpleCellTessellator::TessellateCellArray
protected

To avoid New/Delete.

Definition at line 295 of file vtkSimpleCellTessellator.h.

◆ TessellatePointData

vtkPointData* vtkSimpleCellTessellator::TessellatePointData
protected

To avoid New/Delete.

Definition at line 296 of file vtkSimpleCellTessellator.h.

◆ NumberOfPoints

vtkIdType vtkSimpleCellTessellator::NumberOfPoints
protected

Number of points in the dataset to be tessellated.

Definition at line 354 of file vtkSimpleCellTessellator.h.

◆ FixedSubdivisions

int vtkSimpleCellTessellator::FixedSubdivisions
protected

Definition at line 356 of file vtkSimpleCellTessellator.h.

◆ MaxSubdivisionLevel

int vtkSimpleCellTessellator::MaxSubdivisionLevel
protected

Definition at line 357 of file vtkSimpleCellTessellator.h.

◆ CurrentSubdivisionLevel

int vtkSimpleCellTessellator::CurrentSubdivisionLevel
protected

Definition at line 358 of file vtkSimpleCellTessellator.h.

◆ EdgeIds

const vtkIdType* vtkSimpleCellTessellator::EdgeIds
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 364 of file vtkSimpleCellTessellator.h.

◆ FaceIds

const vtkIdType* vtkSimpleCellTessellator::FaceIds
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 369 of file vtkSimpleCellTessellator.h.

◆ Triangulator

vtkOrderedTriangulator* vtkSimpleCellTessellator::Triangulator
protected

Definition at line 375 of file vtkSimpleCellTessellator.h.

◆ Connectivity

vtkCellArray* vtkSimpleCellTessellator::Connectivity
protected

Definition at line 379 of file vtkSimpleCellTessellator.h.

◆ Polygon

vtkPolygon* vtkSimpleCellTessellator::Polygon
protected

Definition at line 382 of file vtkSimpleCellTessellator.h.

◆ TriangleIds

vtkIdList* vtkSimpleCellTessellator::TriangleIds
protected

Definition at line 385 of file vtkSimpleCellTessellator.h.

◆ PointIds

vtkIdType* vtkSimpleCellTessellator::PointIds
protected

Definition at line 387 of file vtkSimpleCellTessellator.h.

◆ PointIdsCapacity

int vtkSimpleCellTessellator::PointIdsCapacity
protected

Definition at line 388 of file vtkSimpleCellTessellator.h.


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