WTFIT
Public Member Functions | List of all members
wtfit::TwoSkeleton Class Reference

TwoSkeleton processing package. More...

#include <TwoSkeleton.h>

Inheritance diagram for wtfit::TwoSkeleton:
wtfit::Debug

Public Member Functions

 TwoSkeleton ()
 
 ~TwoSkeleton ()
 
int buildCellNeighborsFromVertices (const int &vertexNumber, const int &cellNumber, const long long int *cellArray, vector< vector< int > > &cellNeighbors, vector< vector< int > > *vertexStars=NULL) const
 
int buildEdgeTriangles (const int &vertexNumber, const int &cellNumber, const long long int *cellArray, vector< vector< int > > &edgeTriangleList, vector< vector< int > > *vertexStarList=NULL, vector< pair< int, int > > *edgeList=NULL, vector< vector< int > > *edgeStarList=NULL, vector< vector< int > > *triangleList=NULL, vector< vector< int > > *triangleStarList=NULL, vector< vector< int > > *cellTriangleList=NULL) const
 
int buildTriangleList (const int &vertexNumber, const int &cellNumber, const long long int *cellArray, vector< vector< int > > *triangleList=NULL, vector< vector< int > > *triangleStars=NULL, vector< vector< int > > *cellTriangleList=NULL) const
 
int buildTriangleEdgeList (const int &vertexNumber, const int &cellNumber, const long long int *cellArray, vector< vector< int > > &triangleEdgeList, vector< vector< int > > *vertexEdgeList=NULL, vector< pair< int, int > > *edgeList=NULL, vector< vector< int > > *triangleList=NULL, vector< vector< int > > *triangleStarList=NULL, vector< vector< int > > *cellTriangleList=NULL) const
 
- Public Member Functions inherited from wtfit::Debug
 Debug ()
 
virtual ~Debug ()
 
virtual const int dMsg (ostream &stream, string msg, const int &debugLevel=infoMsg) const
 
const int err (const string msg, const int &debugLevel=infoMsg) const
 
const int msg (const char *msg, const int &debugLevel=infoMsg) const
 
virtual const int setDebugLevel (const int &debugLevel)
 
int setThreadNumber (const int threadNumber)
 
int setWrapper (const Wrapper *wrapper)
 

Additional Inherited Members

- Public Types inherited from wtfit::Debug
enum  debugPriority {
  fatalMsg, timeMsg, memoryMsg, infoMsg,
  detailedInfoMsg, advancedInfoMsg
}
 
- Protected Attributes inherited from wtfit::Debug
bool lastObject_
 
int debugLevel_
 
int threadNumber_
 
Wrapperwrapper_
 

Detailed Description

TwoSkeleton processing package.

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Date
August 2015.

TwoSkeleton is a processing package that handles the 2-skeleton (triangles) of a triangulation.

See also
Triangulation
vtkTriangulation
vtkTwoSkeleton

Constructor & Destructor Documentation

TwoSkeleton::TwoSkeleton ( )
TwoSkeleton::~TwoSkeleton ( )

Member Function Documentation

int TwoSkeleton::buildCellNeighborsFromVertices ( const int &  vertexNumber,
const int &  cellNumber,
const long long int *  cellArray,
vector< vector< int > > &  cellNeighbors,
vector< vector< int > > *  vertexStars = NULL 
) const

Compute the list of cell-neighbors of each cell of a 2D triangulation (unspecified behavior if the input mesh is not a triangulation).

Parameters
vertexNumberNumber of vertices in the triangulation.
cellNumberNumber of maximum-dimensional cells in the triangulation (triangles in 2D, etc.)
cellArrayPointer to a contiguous array of cells. Each entry starts by the number of vertices in the cell, followed by the vertex identifiers of the cell.
cellNeighborsOutput neighbor list. The size of this vector will be equal to the number of cells in the mesh. Each entry will be a vector listing the cell identifiers of the entry's cell's neighbors.
vertexStarsOptional list of vertex stars (list of 2-dimensional cells connected to each vertex). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal vertex star list. If this vector is not empty but incorrect, the behavior is unspecified.
Returns
Returns 0 upon success, negative values otherwise.
int TwoSkeleton::buildEdgeTriangles ( const int &  vertexNumber,
const int &  cellNumber,
const long long int *  cellArray,
vector< vector< int > > &  edgeTriangleList,
vector< vector< int > > *  vertexStarList = NULL,
vector< pair< int, int > > *  edgeList = NULL,
vector< vector< int > > *  edgeStarList = NULL,
vector< vector< int > > *  triangleList = NULL,
vector< vector< int > > *  triangleStarList = NULL,
vector< vector< int > > *  cellTriangleList = NULL 
) const

Compute the list of triangles connected to each edge for 3D triangulation (unspecified behavior if the input mesh is not a triangulation).

Parameters
vertexNumberNumber of vertices in the triangulation.
cellNumberNumber of maximum-dimensional cells in the triangulation (triangles in 2D, etc.)
cellArrayPointer to a contiguous array of cells. Each entry starts by the number of vertices in the cell, followed by the vertex identifiers of the cell.
edgeTriangleListOutput edge triangle list. The size of this vector will be equal to the number of edges in the triangulation. Each entry will be a vector listing the triangle identifiers for each triangle connected to the entry's edge.
vertexStarListOptional output vertex star list (list of tetrahedron identifiers for each vertex). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal vertex star list. If this vector is not empty but incorrect, the behavior is unspecified.
edgeListOptional output edge list (list of pairs of vertex identifiers). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal edge list. If this vector is not empty but incorrect, the behavior is unspecified.
edgeStarListOptional output edge star list (list of tetrahedron identifiers for each edge). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal edge star list. If this vector is not empty but incorrect, the behavior is unspecified.
triangleListOptional output triangle list (list of vectors of vertex identifiers). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal triangle list. If this vector is not empty but incorrect, the behavior is unspecified.
triangleStarListOptional output triangle star list (list of tetrahedron identifiers for each triangle). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal triangle star list. If this vector is not empty but incorrect, the behavior is unspecified.
cellTriangleListOptional output cell triangle list (list of triangle identifiers for each tetrahedron). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal cell triangle list. If this vector is not empty but incorrect, the behavior is unspecified.
int TwoSkeleton::buildTriangleEdgeList ( const int &  vertexNumber,
const int &  cellNumber,
const long long int *  cellArray,
vector< vector< int > > &  triangleEdgeList,
vector< vector< int > > *  vertexEdgeList = NULL,
vector< pair< int, int > > *  edgeList = NULL,
vector< vector< int > > *  triangleList = NULL,
vector< vector< int > > *  triangleStarList = NULL,
vector< vector< int > > *  cellTriangleList = NULL 
) const

Compute the list of edges connected to each triangle for 3D triangulation (unspecified behavior if the input mesh is not a 3D triangulation).

Parameters
vertexNumberNumber of vertices in the triangulation.
cellNumberNumber of maximum-dimensional cells in the triangulation (triangles in 2D, etc.)
cellArrayPointer to a contiguous array of cells. Each entry starts by the number of vertices in the cell, followed by the vertex identifiers of the cell.
triangleEdgeListOutput triangle edge list. The size of this vector will be equal to the number of triangles in the triangulation. Each entry will be a vector listing the edge identifiers for each edge connected to the entry's triangle.
vertexEdgeListOptional output vertex edge list (list of edge identifiers for each vertex). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal vertex edge list. If this vector is not empty but incorrect, the behavior is unspecified.
edgeListOptional output edge list (list of pairs of vertex identifiers). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal edge list. If this vector is not empty but incorrect, the behavior is unspecified.
triangleListOptional output triangle list (list of vectors of vertex identifiers). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal triangle list. If this vector is not empty but incorrect, the behavior is unspecified.
triangleStarListOptional output triangle star list (list of tetrahedron identifiers for each triangle). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal triangle star list. If this vector is not empty but incorrect, the behavior is unspecified.
cellTriangleListOptional output cell triangle list (list of triangle identifiers for each tetrahedron). If NULL, the function will compute this list anyway and free the related memory upon return. If not NULL but pointing to an empty vector, the function will fill this empty vector (useful if this list needs to be used later on by the calling program). If not NULL but pointing to a non-empty vector, this function will use this vector as internal cell triangle list. If this vector is not empty but incorrect, the behavior is unspecified.
int TwoSkeleton::buildTriangleList ( const int &  vertexNumber,
const int &  cellNumber,
const long long int *  cellArray,
vector< vector< int > > *  triangleList = NULL,
vector< vector< int > > *  triangleStars = NULL,
vector< vector< int > > *  cellTriangleList = NULL 
) const

Compute the list of triangles of a triangulation represented by a vtkUnstructuredGrid object. Unspecified behavior if the input mesh is not a valid triangulation.

Parameters
vertexNumberNumber of vertices in the triangulation.
cellNumberNumber of maximum-dimensional cells in the triangulation (number of tetrahedra in 3D, only)
cellArrayPointer to a contiguous array of cells. Each entry starts by the number of vertices in the cell, followed by the vertex identifiers of the cell.
triangleListOptional output triangle list (each entry is the ordered vector of the vertex identifiers of the entry's triangle).
triangleStarsOptional output for triangle tet-adjacency (for each triangle, list of its adjacent tetrahedra).
Returns
Returns 0 upon success, negative values otherwise.

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