VTK  9.1.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkGenericAdaptorCell Class Referenceabstract

defines cell interface More...

#include <vtkGenericAdaptorCell.h>

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

Public Types

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.
 
vtkGenericAdaptorCellNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual vtkIdType GetId ()=0
 Unique identification number of the cell over the whole data set.
 
virtual int IsInDataSet ()=0
 Does ‘this’ a cell of a dataset? (otherwise, it is a boundary cell)
 
virtual int GetType ()=0
 Return the type of the current cell.
 
virtual int GetDimension ()=0
 Return the topological dimension of the current cell.
 
virtual int GetGeometryOrder ()=0
 Return the interpolation order of the geometry.
 
int IsGeometryLinear ()
 Does the cell have a non-linear interpolation for the geometry?
 
virtual int GetAttributeOrder (vtkGenericAttribute *a)=0
 Return the interpolation order of attribute ‘a’ on the cell (may differ by cell).
 
virtual int GetHighestOrderAttribute (vtkGenericAttributeCollection *ac)
 Return the index of the first point centered attribute with the highest order in ‘ac’.
 
vtkTypeBool IsAttributeLinear (vtkGenericAttribute *a)
 Does the attribute ‘a’ have a non-linear interpolation?
 
virtual int IsPrimary ()=0
 Is the cell primary (i.e.
 
virtual int GetNumberOfPoints ()=0
 Return the number of corner points that compose the cell.
 
virtual int GetNumberOfBoundaries (int dim=-1)=0
 Return the number of boundaries of dimension ‘dim’ (or all dimensions greater than 0 and less than GetDimension() if -1) of the cell.
 
virtual int GetNumberOfDOFNodes ()=0
 Accumulated number of DOF nodes of the current cell.
 
virtual void GetPointIterator (vtkGenericPointIterator *it)=0
 Return the points of cell into ‘it’.
 
virtual vtkGenericCellIteratorNewCellIterator ()=0
 Create an empty cell iterator.
 
virtual void GetBoundaryIterator (vtkGenericCellIterator *boundaries, int dim=-1)=0
 Return the ‘boundaries’ cells of dimension ‘dim’ (or all dimensions less than GetDimension() if -1) that are part of the boundary of the cell.
 
virtual void GetNeighbors (vtkGenericAdaptorCell *boundary, vtkGenericCellIterator *neighbors)=0
 Put into ‘neighbors’ the cells (dimension>boundary->GetDimension()) of the dataset that share the boundary ‘boundary’ with this cell.
 
virtual int FindClosestBoundary (int subId, double pcoords[3], vtkGenericCellIterator *&boundary)=0
 Compute the closest boundary of the current sub-cell ‘subId’ for point ‘pcoord’ (in parametric coordinates) in ‘boundary’, and return whether the point is inside the cell or not.
 
virtual int EvaluatePosition (const double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2)=0
 Is ‘x’ inside the current cell? It also evaluates parametric coordinates ‘pcoords’, sub-cell id ‘subId’ (0 means primary cell), distance squared to the sub-cell in ‘dist2’ and closest corner point ‘closestPoint’.
 
virtual void EvaluateLocation (int subId, double pcoords[3], double x[3])=0
 Determine the global coordinates ‘x’ from sub-cell ‘subId’ and parametric coordinates ‘pcoords’ in the cell.
 
virtual void InterpolateTuple (vtkGenericAttribute *a, double pcoords[3], double *val)=0
 Interpolate the attribute ‘a’ at local position ‘pcoords’ of the cell into ‘val’.
 
virtual void InterpolateTuple (vtkGenericAttributeCollection *c, double pcoords[3], double *val)=0
 Interpolate the whole collection of attributes ‘c’ at local position ‘pcoords’ of the cell into ‘val’.
 
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)
 Generate a contour (contouring primitives) for each ‘values’ or with respect to an implicit function ‘f’.
 
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)
 Cut (or clip) the current cell with respect to the contour defined by the ‘value’ or the implicit function ‘f’ of the scalar attribute (‘attributes->GetActiveAttribute()’,‘attributes->GetActiveComponent()’).
 
virtual int IntersectWithLine (double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
 Is there an intersection between the current cell and the ray (‘p1’,‘p2’) according to a tolerance ‘tol’? If true, ‘x’ is the global intersection, ‘t’ is the parametric coordinate for the line, ‘pcoords’ are the parametric coordinates for cell.
 
virtual void Derivatives (int subId, double pcoords[3], vtkGenericAttribute *attribute, double *derivs)=0
 Compute derivatives ‘derivs’ of the attribute ‘attribute’ (from its values at the corner points of the cell) given sub-cell ‘subId’ (0 means primary cell) and parametric coordinates ‘pcoords’.
 
virtual void GetBounds (double bounds[6])=0
 Compute the bounding box of the current cell in ‘bounds’ in global coordinates.
 
virtual double * GetBounds ()
 Return the bounding box of the current cell in global coordinates.
 
virtual double GetLength2 ()
 Return the bounding box diagonal squared of the current cell.
 
virtual int GetParametricCenter (double pcoords[3])=0
 Get the center of the current cell (in parametric coordinates) and place it in ‘pcoords’.
 
virtual double GetParametricDistance (const double pcoords[3])=0
 Return the distance of the parametric coordinate ‘pcoords’ to the current cell.
 
virtual double * GetParametricCoords ()=0
 Return a contiguous array of parametric coordinates of the corrner points defining the current cell.
 
virtual void Tessellate (vtkGenericAttributeCollection *attributes, vtkGenericCellTessellator *tess, vtkPoints *points, vtkIncrementalPointLocator *locator, vtkCellArray *cellArray, vtkPointData *internalPd, vtkPointData *pd, vtkCellData *cd, vtkUnsignedCharArray *types)
 Tessellate the cell if it is not linear or if at least one attribute of ‘attributes’ is not linear.
 
virtual int IsFaceOnBoundary (vtkIdType faceId)=0
 Is the face ‘faceId’ of the current cell on the exterior boundary of the dataset?
 
virtual int IsOnBoundary ()=0
 Is the cell on the exterior boundary of the dataset?
 
virtual void GetPointIds (vtkIdType *id)=0
 Put into ‘id’ the list of the dataset points that define the corner points of the cell.
 
virtual void TriangulateFace (vtkGenericAttributeCollection *attributes, vtkGenericCellTessellator *tess, int index, vtkPoints *points, vtkIncrementalPointLocator *locator, vtkCellArray *cellArray, vtkPointData *internalPd, vtkPointData *pd, vtkCellData *cd)
 Tessellate face ‘index’ of the cell.
 
virtual const vtkIdTypeGetFaceArray (vtkIdType faceId)=0
 Return the ids of the vertices defining face ‘faceId’.
 
virtual int GetNumberOfVerticesOnFace (int faceId)=0
 Return the number of vertices defining face ‘faceId’.
 
virtual const vtkIdTypeGetEdgeArray (vtkIdType edgeId)=0
 Return the ids of the vertices defining edge ‘edgeId’.
 
virtual int CountNeighbors (vtkGenericAdaptorCell *boundary)=0
 Number of cells (dimension>boundary->GetDimension()) of the dataset that share the boundary ‘boundary’ of ‘this’.
 
virtual void CountEdgeNeighbors (int *sharing)=0
 Number of cells (dimension>boundary->GetDimension()) of the dataset that share the boundary ‘boundary’ of ‘this’.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
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)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
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.
 
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.
 
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.
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
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).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkGenericAdaptorCellSafeDownCast (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.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- 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.
 
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).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
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.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkGenericAdaptorCell ()
 
 ~vtkGenericAdaptorCell () override
 
void Reset ()
 Reset internal structures.
 
void AllocateTuples (int size)
 Allocate some memory if Tuples does not exist or is smaller than size.
 
- 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.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkTetraTetra
 
vtkTriangleTriangle
 
vtkLineLine
 
vtkVertexVertex
 
vtkQuadQuad
 
vtkHexahedronHexa
 
vtkWedgeWedge
 
vtkPyramidPyramid
 
vtkDoubleArrayInternalPoints
 
vtkCellArrayInternalCellArray
 
vtkDoubleArrayInternalScalars
 
vtkDoubleArrayPointDataScalars
 
vtkIdListInternalIds
 
vtkDoubleArrayScalars
 
vtkPointDataPointData
 
vtkCellDataCellData
 
double * Tuples
 
int TuplesCapacity
 
double Bounds [6]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

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

Detailed Description

defines cell interface

In VTK, spatial-temporal data is defined in terms of a dataset which is composed of cells. The cells are topological entities over which an interpolation field is applied. Cells are defined in terms of a topology (e.g., vertices, lines, triangles, polygons, tetrahedra, etc.), points that instantiate the geometry of the cells, and interpolation fields (in the general case one interpolation field is for geometry, the other is for attribute data associated with the cell).

Currently most algorithms in VTK use vtkCell and vtkDataSet, which make assumptions about the nature of datasets, cells, and attributes. In particular, this abstraction assumes that cell interpolation functions are linear, or products of linear functions. Further, VTK implements most of the interpolation functions. This implementation starts breaking down as the complexity of the interpolation (or basis) functions increases.

vtkGenericAdaptorCell addresses these issues by providing more general abstraction for cells. It also adopts modern C++ practices including using iterators. The vtkGenericAdaptorCell is designed to fit within the adaptor framework; meaning that it is meant to adapt VTK to external simulation systems (see the GenericFiltering/README.html).

Please note that most cells are defined in terms of other cells (the boundary cells). They are also defined in terms of points, which are not the same as vertices (vertices are a 0-D cell; points represent a position in space).

Another important concept is the notion of DOFNodes. These concept supports cell types with complex interpolation functions. For example, higher-order p-method finite elements may have different functions on each of their topological features (edges, faces, region). The coefficients of these polynomial functions are associated with DOFNodes. (There is a single DOFNode for each topological feature.) Note that from this perspective, points are used to establish the topological form of the cell; mid-side nodes and such are considered DOFNodes.

See also
vtkGenericDataSet

Definition at line 91 of file vtkGenericAdaptorCell.h.

Member Typedef Documentation

◆ Superclass

Definition at line 94 of file vtkGenericAdaptorCell.h.

Constructor & Destructor Documentation

◆ vtkGenericAdaptorCell()

vtkGenericAdaptorCell::vtkGenericAdaptorCell ( )
protected

◆ ~vtkGenericAdaptorCell()

vtkGenericAdaptorCell::~vtkGenericAdaptorCell ( )
overrideprotected

Member Function Documentation

◆ IsTypeOf()

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

◆ IsA()

virtual vtkTypeBool vtkGenericAdaptorCell::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 vtkObjectBase.

◆ SafeDownCast()

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

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkGenericAdaptorCell::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkGenericAdaptorCell * vtkGenericAdaptorCell::NewInstance ( ) const

◆ PrintSelf()

void vtkGenericAdaptorCell::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 vtkObject.

◆ GetId()

virtual vtkIdType vtkGenericAdaptorCell::GetId ( )
pure virtual

Unique identification number of the cell over the whole data set.

This unique key may not be contiguous.

◆ IsInDataSet()

virtual int vtkGenericAdaptorCell::IsInDataSet ( )
pure virtual

Does ‘this’ a cell of a dataset? (otherwise, it is a boundary cell)

◆ GetType()

virtual int vtkGenericAdaptorCell::GetType ( )
pure virtual

Return the type of the current cell.

Postcondition
(result==VTK_HIGHER_ORDER_EDGE)|| (result==VTK_HIGHER_ORDER_TRIANGLE)|| (result==VTK_HIGHER_ORDER_TETRAHEDRON)

◆ GetDimension()

virtual int vtkGenericAdaptorCell::GetDimension ( )
pure virtual

Return the topological dimension of the current cell.

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

◆ GetGeometryOrder()

virtual int vtkGenericAdaptorCell::GetGeometryOrder ( )
pure virtual

Return the interpolation order of the geometry.

Postcondition
positive_result: result>=0

◆ IsGeometryLinear()

int vtkGenericAdaptorCell::IsGeometryLinear ( )

Does the cell have a non-linear interpolation for the geometry?

Postcondition
definition: result==(GetGeometryOrder()==1)

◆ GetAttributeOrder()

virtual int vtkGenericAdaptorCell::GetAttributeOrder ( vtkGenericAttribute a)
pure virtual

Return the interpolation order of attribute ‘a’ on the cell (may differ by cell).

Precondition
a_exists: a!=0
Postcondition
positive_result: result>=0

◆ GetHighestOrderAttribute()

virtual int vtkGenericAdaptorCell::GetHighestOrderAttribute ( vtkGenericAttributeCollection ac)
virtual

Return the index of the first point centered attribute with the highest order in ‘ac’.

Precondition
ac_exists: ac!=0
Postcondition
valid_result: result>=-1 && result<ac->GetNumberOfAttributes()

◆ IsAttributeLinear()

vtkTypeBool vtkGenericAdaptorCell::IsAttributeLinear ( vtkGenericAttribute a)

Does the attribute ‘a’ have a non-linear interpolation?

Precondition
a_exists: a!=0
Postcondition
definition: result==(GetAttributeOrder()==1)

◆ IsPrimary()

virtual int vtkGenericAdaptorCell::IsPrimary ( )
pure virtual

Is the cell primary (i.e.

not composite) ?

◆ GetNumberOfPoints()

virtual int vtkGenericAdaptorCell::GetNumberOfPoints ( )
pure virtual

Return the number of corner points that compose the cell.

Postcondition
positive_result: result>=0

◆ GetNumberOfBoundaries()

virtual int vtkGenericAdaptorCell::GetNumberOfBoundaries ( int  dim = -1)
pure virtual

Return the number of boundaries of dimension ‘dim’ (or all dimensions greater than 0 and less than GetDimension() if -1) of the cell.

When dim is -1, the number of vertices is not included in the count because vertices are a special case: a vertex will have at most a single field value associated with it; DOF nodes may have an arbitrary number of field values associated with them.

Precondition
valid_dim_range: (dim==-1) || ((dim>=0)&&(dim<GetDimension()))
Postcondition
positive_result: result>=0

◆ GetNumberOfDOFNodes()

virtual int vtkGenericAdaptorCell::GetNumberOfDOFNodes ( )
pure virtual

Accumulated number of DOF nodes of the current cell.

A DOF node is a component of cell with a given topological dimension. e.g.: a triangle has 4 DOF: 1 face and 3 edges. An hexahedron has 19 DOF: 1 region, 6 faces, and 12 edges.

The number of vertices is not included in the count because vertices are a special case: a vertex will have at most a single field value associated with it; DOF nodes may have an arbitrary number of field values associated with them.

Postcondition
valid_result: result==GetNumberOfBoundaries(-1)+1

◆ GetPointIterator()

virtual void vtkGenericAdaptorCell::GetPointIterator ( vtkGenericPointIterator it)
pure virtual

Return the points of cell into ‘it’.

Precondition
it_exists: it!=0

◆ NewCellIterator()

virtual vtkGenericCellIterator * vtkGenericAdaptorCell::NewCellIterator ( )
pure virtual

Create an empty cell iterator.

The user is responsible for deleting it.

Postcondition
result_exists: result!=0

◆ GetBoundaryIterator()

virtual void vtkGenericAdaptorCell::GetBoundaryIterator ( vtkGenericCellIterator boundaries,
int  dim = -1 
)
pure virtual

Return the ‘boundaries’ cells of dimension ‘dim’ (or all dimensions less than GetDimension() if -1) that are part of the boundary of the cell.

Precondition
valid_dim_range: (dim==-1) || ((dim>=0)&&(dim<GetDimension()))
boundaries_exist: boundaries!=0

◆ CountNeighbors()

virtual int vtkGenericAdaptorCell::CountNeighbors ( vtkGenericAdaptorCell boundary)
pure virtual

Number of cells (dimension>boundary->GetDimension()) of the dataset that share the boundary ‘boundary’ of ‘this’.

‘this’ IS NOT INCLUDED.

Precondition
boundary_exists: boundary!=0
real_boundary: !boundary->IsInDataSet()
cell_of_the_dataset: IsInDataSet()
boundary: HasBoundary(boundary)
Postcondition
positive_result: result>=0

◆ CountEdgeNeighbors()

virtual void vtkGenericAdaptorCell::CountEdgeNeighbors ( int *  sharing)
pure virtual

Number of cells (dimension>boundary->GetDimension()) of the dataset that share the boundary ‘boundary’ of ‘this’.

‘this’ IS NOT INCLUDED.

Precondition
boundary_exists: boundary!=0
real_boundary: !boundary->IsInDataSet()
cell_of_the_dataset: IsInDataSet()
boundary: HasBoundary(boundary)
Postcondition
positive_result: result>=0

◆ GetNeighbors()

virtual void vtkGenericAdaptorCell::GetNeighbors ( vtkGenericAdaptorCell boundary,
vtkGenericCellIterator neighbors 
)
pure virtual

Put into ‘neighbors’ the cells (dimension>boundary->GetDimension()) of the dataset that share the boundary ‘boundary’ with this cell.

‘this’ IS NOT INCLUDED.

Precondition
boundary_exists: boundary!=0
real_boundary: !boundary->IsInDataSet()
cell_of_the_dataset: IsInDataSet()
boundary: HasBoundary(boundary)
neighbors_exist: neighbors!=0

◆ FindClosestBoundary()

virtual int vtkGenericAdaptorCell::FindClosestBoundary ( int  subId,
double  pcoords[3],
vtkGenericCellIterator *&  boundary 
)
pure virtual

Compute the closest boundary of the current sub-cell ‘subId’ for point ‘pcoord’ (in parametric coordinates) in ‘boundary’, and return whether the point is inside the cell or not.

‘boundary’ is of dimension GetDimension()-1.

Precondition
positive_subId: subId>=0

◆ EvaluatePosition()

virtual int vtkGenericAdaptorCell::EvaluatePosition ( const double  x[3],
double *  closestPoint,
int &  subId,
double  pcoords[3],
double &  dist2 
)
pure virtual

Is ‘x’ inside the current cell? It also evaluates parametric coordinates ‘pcoords’, sub-cell id ‘subId’ (0 means primary cell), distance squared to the sub-cell in ‘dist2’ and closest corner point ‘closestPoint’.

‘dist2’ and ‘closestPoint’ are not evaluated if ‘closestPoint’==0. If a numerical error occurred, -1 is returned and all other results should be ignored.

Postcondition
valid_result: result==-1 || result==0 || result==1
positive_distance: result!=-1 implies (closestPoint!=0 implies dist2>=0)

◆ EvaluateLocation()

virtual void vtkGenericAdaptorCell::EvaluateLocation ( int  subId,
double  pcoords[3],
double  x[3] 
)
pure virtual

Determine the global coordinates ‘x’ from sub-cell ‘subId’ and parametric coordinates ‘pcoords’ in the cell.

Precondition
positive_subId: subId>=0
clamped_pcoords: (0<=pcoords[0])&&(pcoords[0]<=1)&&(0<=pcoords[1]) &&(pcoords[1]<=1)&&(0<=pcoords[2])&&(pcoords[2]<=1)

◆ InterpolateTuple() [1/2]

virtual void vtkGenericAdaptorCell::InterpolateTuple ( vtkGenericAttribute a,
double  pcoords[3],
double *  val 
)
pure virtual

Interpolate the attribute ‘a’ at local position ‘pcoords’ of the cell into ‘val’.

Precondition
a_exists: a!=0
a_is_point_centered: a->GetCentering()==vtkPointCentered
clamped_point: pcoords[0]>=0 && pcoords[0]<=1 && pcoords[1]>=0 && pcoords[1]<=1 && pcoords[2]>=0 && pcoords[2]<=1
val_exists: val!=0
valid_size: sizeof(val)==a->GetNumberOfComponents()

◆ InterpolateTuple() [2/2]

virtual void vtkGenericAdaptorCell::InterpolateTuple ( vtkGenericAttributeCollection c,
double  pcoords[3],
double *  val 
)
pure virtual

Interpolate the whole collection of attributes ‘c’ at local position ‘pcoords’ of the cell into ‘val’.

Only point centered attributes are taken into account.

Precondition
c_exists: c!=0
clamped_point: pcoords[0]>=0 && pcoords[0]<=1 && pcoords[1]>=0 && pcoords[1]<=1 && pcoords[2]>=0 && pcoords[2]<=1
val_exists: val!=0
valid_size: sizeof(val)==c->GetNumberOfPointCenteredComponents()

◆ Contour()

virtual void vtkGenericAdaptorCell::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

Generate a contour (contouring primitives) for each ‘values’ or with respect to an implicit function ‘f’.

Contouring is performed on the scalar attribute (‘attributes->GetActiveAttribute()’ ‘attributes->GetActiveComponent()’). Contouring interpolates the ‘attributes->GetNumberOfattributesToInterpolate()’ attributes ‘attributes->GetAttributesToInterpolate()’. The ‘locator’, ‘verts’, ‘lines’, ‘polys’, ‘outPd’ and ‘outCd’ are cumulative data arrays over cell iterations: they store the result of each call to Contour():

  • ‘locator’ is a points list that merges points as they are inserted (i.e., prevents duplicates).
  • ‘verts’ is an array of generated vertices
  • ‘lines’ is an array of generated lines
  • ‘polys’ is an array of generated polygons
  • ‘outPd’ is an array of interpolated point data along the edge (if not-nullptr)
  • ‘outCd’ is an array of copied cell data of the current cell (if not-nullptr) ‘internalPd’, ‘secondaryPd’ and ‘secondaryCd’ are initialized by the filter that call it from ‘attributes’.
  • ‘internalPd’ stores the result of the tessellation pass: the higher-order cell is tessellated into linear sub-cells.
  • ‘secondaryPd’ and ‘secondaryCd’ are used internally as inputs to the Contour() method on linear sub-cells. Note: the CopyAllocate() method must be invoked on both ‘outPd’ and ‘outCd’, from ‘secondaryPd’ and ‘secondaryCd’.

NOTE: ‘vtkGenericAttributeCollection *attributes’ will be replaced by a ‘vtkInformation’.

Precondition
values_exist: (values!=0 && f==0) || (values==0 && f!=0)
attributes_exist: attributes!=0
tessellator_exists: tess!=0
locator_exists: locator!=0
verts_exist: verts!=0
lines_exist: lines!=0
polys_exist: polys!=0
internalPd_exists: internalPd!=0
secondaryPd_exists: secondaryPd!=0
secondaryCd_exists: secondaryCd!=0

◆ Clip()

virtual void vtkGenericAdaptorCell::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

Cut (or clip) the current cell with respect to the contour defined by the ‘value’ or the implicit function ‘f’ of the scalar attribute (‘attributes->GetActiveAttribute()’,‘attributes->GetActiveComponent()’).

If ‘f’ exists, ‘value’ is not used. The output is the part of the current cell which is inside the contour. The output is a set of zero, one or more cells of the same topological dimension as the current cell. Normally, cell points whose scalar value is greater than "value" are considered inside. If ‘insideOut’ is on, this is reversed. Clipping interpolates the ‘attributes->GetNumberOfattributesToInterpolate()’ attributes ‘attributes->GetAttributesToInterpolate()’. ‘locator’, ‘connectivity’, ‘outPd’ and ‘outCd’ are cumulative data arrays over cell iterations: they store the result of each call to Clip():

  • ‘locator’ is a points list that merges points as they are inserted (i.e., prevents duplicates).
  • ‘connectivity’ is an array of generated cells
  • ‘outPd’ is an array of interpolated point data along the edge (if not-nullptr)
  • ‘outCd’ is an array of copied cell data of the current cell (if not-nullptr) ‘internalPd’, ‘secondaryPd’ and ‘secondaryCd’ are initialized by the filter that call it from ‘attributes’.
  • ‘internalPd’ stores the result of the tessellation pass: the higher-order cell is tessellated into linear sub-cells.
  • ‘secondaryPd’ and ‘secondaryCd’ are used internally as inputs to the Clip() method on linear sub-cells. Note: the CopyAllocate() method must be invoked on both ‘outPd’ and ‘outCd’, from ‘secondaryPd’ and ‘secondaryCd’.

NOTE: ‘vtkGenericAttributeCollection *attributes’ will be replaced by a ‘vtkInformation’.

Precondition
attributes_exist: attributes!=0
tessellator_exists: tess!=0
locator_exists: locator!=0
connectivity_exists: connectivity!=0
internalPd_exists: internalPd!=0
secondaryPd_exists: secondaryPd!=0
secondaryCd_exists: secondaryCd!=0

◆ IntersectWithLine()

virtual int vtkGenericAdaptorCell::IntersectWithLine ( double  p1[3],
double  p2[3],
double  tol,
double &  t,
double  x[3],
double  pcoords[3],
int &  subId 
)
pure virtual

Is there an intersection between the current cell and the ray (‘p1’,‘p2’) according to a tolerance ‘tol’? If true, ‘x’ is the global intersection, ‘t’ is the parametric coordinate for the line, ‘pcoords’ are the parametric coordinates for cell.

‘subId’ is the sub-cell where the intersection occurs.

Precondition
positive_tolerance: tol>0

◆ Derivatives()

virtual void vtkGenericAdaptorCell::Derivatives ( int  subId,
double  pcoords[3],
vtkGenericAttribute attribute,
double *  derivs 
)
pure virtual

Compute derivatives ‘derivs’ of the attribute ‘attribute’ (from its values at the corner points of the cell) given sub-cell ‘subId’ (0 means primary cell) and parametric coordinates ‘pcoords’.

Derivatives are in the x-y-z coordinate directions for each data value.

Precondition
positive_subId: subId>=0
clamped_pcoords: (0<=pcoords[0])&&(pcoords[0]<=1)&&(0<=pcoords[1]) &&(pcoords[1]<=1)&&(0<=pcoords[2])%%(pcoords[2]<=1)
attribute_exists: attribute!=0
derivs_exists: derivs!=0
valid_size: sizeof(derivs)>=attribute->GetNumberOfComponents()*3

◆ GetBounds() [1/2]

virtual void vtkGenericAdaptorCell::GetBounds ( double  bounds[6])
pure virtual

Compute the bounding box of the current cell in ‘bounds’ in global coordinates.

THREAD SAFE

◆ GetBounds() [2/2]

virtual double * vtkGenericAdaptorCell::GetBounds ( )
virtual

Return the bounding box of the current cell in global coordinates.

NOT THREAD SAFE

Postcondition
result_exists: result!=0
valid_size: sizeof(result)>=6

◆ GetLength2()

virtual double vtkGenericAdaptorCell::GetLength2 ( )
virtual

Return the bounding box diagonal squared of the current cell.

Postcondition
positive_result: result>=0

◆ GetParametricCenter()

virtual int vtkGenericAdaptorCell::GetParametricCenter ( double  pcoords[3])
pure virtual

Get the center of the current cell (in parametric coordinates) and place it in ‘pcoords’.

If the current cell is a composite, the return value is the sub-cell id that the center is in.

Postcondition
valid_result: (result>=0) && (IsPrimary() implies result==0)

◆ GetParametricDistance()

virtual double vtkGenericAdaptorCell::GetParametricDistance ( const double  pcoords[3])
pure virtual

Return the distance of the parametric coordinate ‘pcoords’ to the current cell.

If inside the cell, a distance of zero is returned. This is used during picking to get the correct cell picked. (The tolerance will occasionally allow cells to be picked who are not really intersected "inside" the cell.)

Postcondition
positive_result: result>=0

◆ GetParametricCoords()

virtual double * vtkGenericAdaptorCell::GetParametricCoords ( )
pure virtual

Return a contiguous array of parametric coordinates of the corrner points defining the current cell.

In other words, (px,py,pz, px,py,pz, etc..) The coordinates are ordered consistent with the definition of the point ordering for the cell. Note that 3D parametric coordinates are returned no matter what the topological dimension of the cell.

Postcondition
valid_result_exists: ((IsPrimary()) && (result!=0)) || ((!IsPrimary()) && (result==0)) result!=0 implies sizeof(result)==GetNumberOfPoints()

◆ Tessellate()

virtual void vtkGenericAdaptorCell::Tessellate ( vtkGenericAttributeCollection attributes,
vtkGenericCellTessellator tess,
vtkPoints points,
vtkIncrementalPointLocator locator,
vtkCellArray cellArray,
vtkPointData internalPd,
vtkPointData pd,
vtkCellData cd,
vtkUnsignedCharArray types 
)
virtual

Tessellate the cell if it is not linear or if at least one attribute of ‘attributes’ is not linear.

The output are linear cells of the same dimension than the cell. If the cell is linear and all attributes are linear, the output is just a copy of the current cell. ‘points’, ‘cellArray’, ‘pd’ and ‘cd’ are cumulative output data arrays over cell iterations: they store the result of each call to Tessellate(). ‘internalPd’ is initialized by the calling filter and stores the result of the tessellation. If it is not null, ‘types’ is filled with the types of the linear cells. ‘types’ is null when it is called from vtkGenericGeometryFilter and not null when it is called from vtkGenericDatasetTessellator.

Precondition
attributes_exist: attributes!=0
tessellator_exists: tess!=0
points_exist: points!=0
cellArray_exists: cellArray!=0
internalPd_exists: internalPd!=0
pd_exist: pd!=0
cd_exists: cd!=0

◆ IsFaceOnBoundary()

virtual int vtkGenericAdaptorCell::IsFaceOnBoundary ( vtkIdType  faceId)
pure virtual

Is the face ‘faceId’ of the current cell on the exterior boundary of the dataset?

Precondition
3d: GetDimension()==3

◆ IsOnBoundary()

virtual int vtkGenericAdaptorCell::IsOnBoundary ( )
pure virtual

Is the cell on the exterior boundary of the dataset?

Precondition
2d: GetDimension()==2

◆ GetPointIds()

virtual void vtkGenericAdaptorCell::GetPointIds ( vtkIdType id)
pure virtual

Put into ‘id’ the list of the dataset points that define the corner points of the cell.

Precondition
id_exists: id!=0
valid_size: sizeof(id)==GetNumberOfPoints();

◆ TriangulateFace()

virtual void vtkGenericAdaptorCell::TriangulateFace ( vtkGenericAttributeCollection attributes,
vtkGenericCellTessellator tess,
int  index,
vtkPoints points,
vtkIncrementalPointLocator locator,
vtkCellArray cellArray,
vtkPointData internalPd,
vtkPointData pd,
vtkCellData cd 
)
virtual

Tessellate face ‘index’ of the cell.

See Tessellate() for further explanations.

Precondition
cell_is_3d: GetDimension()==3
attributes_exist: attributes!=0
tessellator_exists: tess!=0
valid_face: index>=0
points_exist: points!=0
cellArray_exists: cellArray!=0
internalPd_exists: internalPd!=0
pd_exist: pd!=0
cd_exists: cd!=0

◆ GetFaceArray()

virtual const vtkIdType * vtkGenericAdaptorCell::GetFaceArray ( vtkIdType  faceId)
pure virtual

Return the ids of the vertices defining face ‘faceId’.

Ids are related to the cell, not to the dataset.

Precondition
is_3d: this->GetDimension()==3
valid_faceId_range: faceId>=0 && faceId<this->GetNumberOfBoundaries(2)
Postcondition
result_exists: result!=0
valid_size: sizeof(result)>=GetNumberOfVerticesOnFace(faceId)
Note
The return type changed. It used to be int*, it is now const vtkIdType*. This is so ids are unified between vtkCell and vtkPoints, and so vtkCell ids can be used as inputs in algorithms such as vtkPolygon::ComputeNormal.

◆ GetNumberOfVerticesOnFace()

virtual int vtkGenericAdaptorCell::GetNumberOfVerticesOnFace ( int  faceId)
pure virtual

Return the number of vertices defining face ‘faceId’.

Precondition
is_3d: this->GetDimension()==3
valid_faceId_range: faceId>=0 && faceId<this->GetNumberOfBoundaries(2)
Postcondition
positive_result: && result>0

◆ GetEdgeArray()

virtual const vtkIdType * vtkGenericAdaptorCell::GetEdgeArray ( vtkIdType  edgeId)
pure virtual

Return the ids of the vertices defining edge ‘edgeId’.

Ids are related to the cell, not to the dataset.

Precondition
valid_dimension: this->GetDimension()>=2
valid_edgeId_range: edgeId>=0 && edgeId<this->GetNumberOfBoundaries(1)
Postcondition
result_exists: result!=0
valid_size: sizeof(result)==2
Note
The return type changed. It used to be int*, it is now const vtkIdType*. This is so ids are unified between vtkCell and vtkPoints.

◆ Reset()

void vtkGenericAdaptorCell::Reset ( )
protected

Reset internal structures.

◆ AllocateTuples()

void vtkGenericAdaptorCell::AllocateTuples ( int  size)
protected

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

Precondition
positive_size: size>0

Member Data Documentation

◆ Tetra

vtkTetra* vtkGenericAdaptorCell::Tetra
protected

Definition at line 586 of file vtkGenericAdaptorCell.h.

◆ Triangle

vtkTriangle* vtkGenericAdaptorCell::Triangle
protected

Definition at line 587 of file vtkGenericAdaptorCell.h.

◆ Line

vtkLine* vtkGenericAdaptorCell::Line
protected

Definition at line 588 of file vtkGenericAdaptorCell.h.

◆ Vertex

vtkVertex* vtkGenericAdaptorCell::Vertex
protected

Definition at line 589 of file vtkGenericAdaptorCell.h.

◆ Quad

vtkQuad* vtkGenericAdaptorCell::Quad
protected

Definition at line 590 of file vtkGenericAdaptorCell.h.

◆ Hexa

vtkHexahedron* vtkGenericAdaptorCell::Hexa
protected

Definition at line 591 of file vtkGenericAdaptorCell.h.

◆ Wedge

vtkWedge* vtkGenericAdaptorCell::Wedge
protected

Definition at line 592 of file vtkGenericAdaptorCell.h.

◆ Pyramid

vtkPyramid* vtkGenericAdaptorCell::Pyramid
protected

Definition at line 593 of file vtkGenericAdaptorCell.h.

◆ InternalPoints

vtkDoubleArray* vtkGenericAdaptorCell::InternalPoints
protected

Definition at line 600 of file vtkGenericAdaptorCell.h.

◆ InternalCellArray

vtkCellArray* vtkGenericAdaptorCell::InternalCellArray
protected

Definition at line 601 of file vtkGenericAdaptorCell.h.

◆ InternalScalars

vtkDoubleArray* vtkGenericAdaptorCell::InternalScalars
protected

Definition at line 602 of file vtkGenericAdaptorCell.h.

◆ PointDataScalars

vtkDoubleArray* vtkGenericAdaptorCell::PointDataScalars
protected

Definition at line 603 of file vtkGenericAdaptorCell.h.

◆ InternalIds

vtkIdList* vtkGenericAdaptorCell::InternalIds
protected

Definition at line 605 of file vtkGenericAdaptorCell.h.

◆ Scalars

vtkDoubleArray* vtkGenericAdaptorCell::Scalars
protected

Definition at line 608 of file vtkGenericAdaptorCell.h.

◆ PointData

vtkPointData* vtkGenericAdaptorCell::PointData
protected

Definition at line 609 of file vtkGenericAdaptorCell.h.

◆ CellData

vtkCellData* vtkGenericAdaptorCell::CellData
protected

Definition at line 610 of file vtkGenericAdaptorCell.h.

◆ Tuples

double* vtkGenericAdaptorCell::Tuples
protected

Definition at line 614 of file vtkGenericAdaptorCell.h.

◆ TuplesCapacity

int vtkGenericAdaptorCell::TuplesCapacity
protected

Definition at line 615 of file vtkGenericAdaptorCell.h.

◆ Bounds

double vtkGenericAdaptorCell::Bounds[6]
protected

Definition at line 618 of file vtkGenericAdaptorCell.h.


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