VTK  9.6.1
vtkTetra.h File Reference
#include "vtkCell3D.h"
#include "vtkCommonDataModelModule.h"
Include dependency graph for vtkTetra.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vtkTetra
 a 3D cell that represents a tetrahedron More...

Functions

vtkTetra vtkCell3D GetEdgeToAdjacentFacesArray (vtkIdType edgeId)
 Static method version of GetEdgeToAdjacentFaces.
static vtkTetraNew ()
static vtkTypeBool IsTypeOf (const char *type)
virtual vtkTypeBool IsA (const char *type)
static vtkTetraSafeDownCast (vtkObjectBase *o)
virtual vtkObjectBaseNewInstanceInternal () const
vtkTetraNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent) override
static int * GetTriangleCases (int caseId)
 Return the case table for table-based isocontouring (aka marching cubes style implementations).
int CellBoundary (int subId, const double pcoords[3], vtkIdList *pts) override
 Returns the set of points that are on the boundary of the tetrahedron that are closest parametrically to the point specified.
int GetParametricCenter (double pcoords[3]) override
 Return the center of the tetrahedron in parametric coordinates.
double GetParametricDistance (const double pcoords[3]) override
 Return the distance of the parametric coordinate provided to the cell.
static void TetraCenter (double p1[3], double p2[3], double p3[3], double p4[3], double center[3])
 Compute the center of the tetrahedron,.
static double Circumsphere (double x1[3], double x2[3], double x3[3], double x4[3], double center[3])
 Compute the circumcenter (center[3]) and radius squared (method return value) of a tetrahedron defined by the four points x1, x2, x3, and x4.
static double Insphere (double p1[3], double p2[3], double p3[3], double p4[3], double center[3])
 Compute the center (center[3]) and radius (method return value) of a sphere that just fits inside the faces of a tetrahedron defined by the four points x1, x2, x3, and x4.
static int BarycentricCoords (double x[3], double x1[3], double x2[3], double x3[3], double x4[3], double bcoords[4])
 Given a 3D point x[3], determine the barycentric coordinates of the point.
static double ComputeVolume (double p1[3], double p2[3], double p3[3], double p4[3])
 Compute the volume of a tetrahedron defined by the four points p1, p2, p3, and p4.
int JacobianInverse (double **inverse, double derivs[12])
 Given parametric coordinates compute inverse Jacobian transformation matrix.
static void InterpolationFunctions (const double pcoords[3], double weights[4])
static void InterpolationDerivs (const double pcoords[3], double derivs[12])
static const vtkIdTypeGetFaceToAdjacentFacesArray (vtkIdType faceId)
 Static method version of GetFaceToAdjacentFaces.
static const vtkIdTypeGetPointToIncidentEdgesArray (vtkIdType pointId)
 Static method version of GetPointToIncidentEdgesArray.
static const vtkIdTypeGetPointToIncidentFacesArray (vtkIdType pointId)
 Static method version of GetPointToIncidentFacesArray.
static const vtkIdTypeGetPointToOneRingPointsArray (vtkIdType pointId)
 Static method version of GetPointToOneRingPoints.
static bool ComputeCentroid (vtkPoints *points, const vtkIdType *pointIds, double centroid[3])
 Static method version of GetCentroid.
 vtkTetra ()
 ~vtkTetra () override
void GetEdgePoints (vtkIdType edgeId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
vtkIdType GetFacePoints (vtkIdType faceId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
void GetEdgeToAdjacentFaces (vtkIdType edgeId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
vtkIdType GetFaceToAdjacentFaces (vtkIdType faceId, const vtkIdType *&faceIds) override
 See vtkCell3D API for description of these methods.
vtkIdType GetPointToIncidentEdges (vtkIdType pointId, const vtkIdType *&edgeIds) override
 See vtkCell3D API for description of these methods.
vtkIdType GetPointToIncidentFaces (vtkIdType pointId, const vtkIdType *&faceIds) override
 See vtkCell3D API for description of these methods.
vtkIdType GetPointToOneRingPoints (vtkIdType pointId, const vtkIdType *&pts) override
 See vtkCell3D API for description of these methods.
bool GetCentroid (double centroid[3]) const override
 See vtkCell3D API for description of these methods.
bool IsInsideOut () override
 See vtkCell3D API for description of these methods.
int GetCellType () override
 See the vtkCell API for descriptions of these methods.
int GetNumberOfEdges () override
 See the vtkCell API for descriptions of these methods.
int GetNumberOfFaces () override
 See the vtkCell API for descriptions of these methods.
vtkCellGetEdge (int edgeId) override
 See the vtkCell API for descriptions of these methods.
vtkCellGetFace (int faceId) override
 See the vtkCell API for descriptions of these methods.
void Contour (double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) override
 See the vtkCell API for descriptions of these methods.
void Clip (double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
 See the vtkCell API for descriptions of these methods.
int EvaluatePosition (const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[]) override
 See the vtkCell API for descriptions of these methods.
void EvaluateLocation (int &subId, const double pcoords[3], double x[3], double *weights) override
 See the vtkCell API for descriptions of these methods.
int IntersectWithLine (const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
 Return intersection point (if any) of finite line with cells contained in cell locator.
int TriangulateLocalIds (int index, vtkIdList *ptIds) override
 See the vtkCell API for descriptions of these methods.
void Derivatives (int subId, const double pcoords[3], const double *values, int dim, double *derivs) override
 See the vtkCell API for descriptions of these methods.
double * GetParametricCoords () override
 See the vtkCell API for descriptions of these methods.
void InterpolateFunctions (const double pcoords[3], double weights[4]) override
 Compute the interpolation functions/derivatives (aka shape functions/derivatives).
void InterpolateDerivs (const double pcoords[3], double derivs[12]) override
 Compute the interpolation functions/derivatives (aka shape functions/derivatives).

Variables

static constexpr vtkIdType NumberOfPoints = 4
 static constexpr handle on the number of points.
static constexpr vtkIdType NumberOfEdges = 6
 static contexpr handle on the number of faces.
static constexpr vtkIdType NumberOfFaces = 4
 static contexpr handle on the number of edges.
static constexpr vtkIdType MaximumFaceSize = 3
 static contexpr handle on the maximum face size.
static constexpr vtkIdType MaximumValence = 3
 static constexpr handle on the maximum valence of this cell.
vtkLineLine
vtkTriangleTriangle

Function Documentation

◆ GetEdgeToAdjacentFacesArray()

vtkTetra vtkCell3D GetEdgeToAdjacentFacesArray ( vtkIdType edgeId)

Static method version of GetEdgeToAdjacentFaces.

◆ New()

vtkTetra * GetEdgeToAdjacentFacesArray::New ( )
static

◆ IsTypeOf()

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

◆ IsA()

virtual vtkTypeBool GetEdgeToAdjacentFacesArray::IsA ( const char * type)
virtual

◆ SafeDownCast()

vtkTetra * GetEdgeToAdjacentFacesArray::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * GetEdgeToAdjacentFacesArray::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkTetra * GetEdgeToAdjacentFacesArray::NewInstance ( ) const

◆ PrintSelf()

void GetEdgeToAdjacentFacesArray::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ GetEdgePoints()

void GetEdgeToAdjacentFacesArray::GetEdgePoints ( vtkIdType edgeId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

◆ GetFacePoints()

vtkIdType GetEdgeToAdjacentFacesArray::GetFacePoints ( vtkIdType faceId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

◆ GetEdgeToAdjacentFaces()

void GetEdgeToAdjacentFacesArray::GetEdgeToAdjacentFaces ( vtkIdType edgeId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

◆ GetFaceToAdjacentFaces()

vtkIdType GetEdgeToAdjacentFacesArray::GetFaceToAdjacentFaces ( vtkIdType faceId,
const vtkIdType *& faceIds )
override

See vtkCell3D API for description of these methods.

◆ GetPointToIncidentEdges()

vtkIdType GetEdgeToAdjacentFacesArray::GetPointToIncidentEdges ( vtkIdType pointId,
const vtkIdType *& edgeIds )
override

See vtkCell3D API for description of these methods.

◆ GetPointToIncidentFaces()

vtkIdType GetEdgeToAdjacentFacesArray::GetPointToIncidentFaces ( vtkIdType pointId,
const vtkIdType *& faceIds )
override

See vtkCell3D API for description of these methods.

◆ GetPointToOneRingPoints()

vtkIdType GetEdgeToAdjacentFacesArray::GetPointToOneRingPoints ( vtkIdType pointId,
const vtkIdType *& pts )
override

See vtkCell3D API for description of these methods.

◆ GetCentroid()

bool GetEdgeToAdjacentFacesArray::GetCentroid ( double centroid[3]) const
override

See vtkCell3D API for description of these methods.

◆ IsInsideOut()

bool GetEdgeToAdjacentFacesArray::IsInsideOut ( )
override

See vtkCell3D API for description of these methods.

◆ GetCellType()

int GetEdgeToAdjacentFacesArray::GetCellType ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 52 of file vtkTetra.h.

◆ GetNumberOfEdges()

int GetEdgeToAdjacentFacesArray::GetNumberOfEdges ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 53 of file vtkTetra.h.

◆ GetNumberOfFaces()

int GetEdgeToAdjacentFacesArray::GetNumberOfFaces ( )
override

See the vtkCell API for descriptions of these methods.

Definition at line 54 of file vtkTetra.h.

◆ GetEdge()

vtkCell * GetEdgeToAdjacentFacesArray::GetEdge ( int edgeId)
override

See the vtkCell API for descriptions of these methods.

◆ GetFace()

vtkCell * GetEdgeToAdjacentFacesArray::GetFace ( int faceId)
override

See the vtkCell API for descriptions of these methods.

◆ Contour()

void GetEdgeToAdjacentFacesArray::Contour ( double value,
vtkDataArray * cellScalars,
vtkIncrementalPointLocator * locator,
vtkCellArray * verts,
vtkCellArray * lines,
vtkCellArray * polys,
vtkPointData * inPd,
vtkPointData * outPd,
vtkCellData * inCd,
vtkIdType cellId,
vtkCellData * outCd )
override

See the vtkCell API for descriptions of these methods.

◆ Clip()

void GetEdgeToAdjacentFacesArray::Clip ( double value,
vtkDataArray * cellScalars,
vtkIncrementalPointLocator * locator,
vtkCellArray * connectivity,
vtkPointData * inPd,
vtkPointData * outPd,
vtkCellData * inCd,
vtkIdType cellId,
vtkCellData * outCd,
int insideOut )
override

See the vtkCell API for descriptions of these methods.

◆ EvaluatePosition()

int GetEdgeToAdjacentFacesArray::EvaluatePosition ( const double x[3],
double closestPoint[3],
int & subId,
double pcoords[3],
double & dist2,
double weights[] )
override

See the vtkCell API for descriptions of these methods.

◆ EvaluateLocation()

void GetEdgeToAdjacentFacesArray::EvaluateLocation ( int & subId,
const double pcoords[3],
double x[3],
double * weights )
override

See the vtkCell API for descriptions of these methods.

◆ IntersectWithLine()

int GetEdgeToAdjacentFacesArray::IntersectWithLine ( const double p1[3],
const double p2[3],
double tol,
double & t,
double x[3],
double pcoords[3],
int & subId )
override

Return intersection point (if any) of finite line with cells contained in cell locator.

Line-edge intersection.

See vtkCell.h parameters documentation.

THIS FUNCTION IS NOT THREAD SAFE.

◆ TriangulateLocalIds()

int GetEdgeToAdjacentFacesArray::TriangulateLocalIds ( int index,
vtkIdList * ptIds )
override

See the vtkCell API for descriptions of these methods.

◆ Derivatives()

void GetEdgeToAdjacentFacesArray::Derivatives ( int subId,
const double pcoords[3],
const double * values,
int dim,
double * derivs )
override

See the vtkCell API for descriptions of these methods.

◆ GetParametricCoords()

double * GetEdgeToAdjacentFacesArray::GetParametricCoords ( )
override

See the vtkCell API for descriptions of these methods.

◆ GetTriangleCases()

int * GetEdgeToAdjacentFacesArray::GetTriangleCases ( int caseId)
static

Return the case table for table-based isocontouring (aka marching cubes style implementations).

A linear 3D cell with N vertices will have 2**N cases. The returned case array lists three edges in order to produce one output triangle which may be repeated to generate multiple triangles. The list of cases terminates with a -1 entry.

◆ CellBoundary()

int GetEdgeToAdjacentFacesArray::CellBoundary ( int subId,
const double pcoords[3],
vtkIdList * pts )
override

Returns the set of points that are on the boundary of the tetrahedron that are closest parametrically to the point specified.

This may include faces, edges, or vertices.

◆ GetParametricCenter()

int GetEdgeToAdjacentFacesArray::GetParametricCenter ( double pcoords[3])
override

Return the center of the tetrahedron in parametric coordinates.

◆ GetParametricDistance()

double GetEdgeToAdjacentFacesArray::GetParametricDistance ( const double pcoords[3])
override

Return the distance of the parametric coordinate provided to the cell.

If inside the cell, a distance of zero is returned.

◆ TetraCenter()

void GetEdgeToAdjacentFacesArray::TetraCenter ( double p1[3],
double p2[3],
double p3[3],
double p4[3],
double center[3] )
static

Compute the center of the tetrahedron,.

◆ Circumsphere()

double GetEdgeToAdjacentFacesArray::Circumsphere ( double x1[3],
double x2[3],
double x3[3],
double x4[3],
double center[3] )
static

Compute the circumcenter (center[3]) and radius squared (method return value) of a tetrahedron defined by the four points x1, x2, x3, and x4.

◆ Insphere()

double GetEdgeToAdjacentFacesArray::Insphere ( double p1[3],
double p2[3],
double p3[3],
double p4[3],
double center[3] )
static

Compute the center (center[3]) and radius (method return value) of a sphere that just fits inside the faces of a tetrahedron defined by the four points x1, x2, x3, and x4.

◆ BarycentricCoords()

int GetEdgeToAdjacentFacesArray::BarycentricCoords ( double x[3],
double x1[3],
double x2[3],
double x3[3],
double x4[3],
double bcoords[4] )
static

Given a 3D point x[3], determine the barycentric coordinates of the point.

Barycentric coordinates are a natural coordinate system for simplices that express a position as a linear combination of the vertices. For a tetrahedron, there are four barycentric coordinates (because there are four vertices), and the sum of the coordinates must equal 1. If a point x is inside a simplex, then all four coordinates will be strictly positive. If three coordinates are zero (so the fourth =1), then the point x is on a vertex. If two coordinates are zero, the point x is on an edge (and so on). In this method, you must specify the vertex coordinates x1->x4. Returns 0 if tetrahedron is degenerate.

◆ ComputeVolume()

double GetEdgeToAdjacentFacesArray::ComputeVolume ( double p1[3],
double p2[3],
double p3[3],
double p4[3] )
static

Compute the volume of a tetrahedron defined by the four points p1, p2, p3, and p4.

◆ JacobianInverse()

int GetEdgeToAdjacentFacesArray::JacobianInverse ( double ** inverse,
double derivs[12] )

Given parametric coordinates compute inverse Jacobian transformation matrix.

Returns 9 elements of 3x3 inverse Jacobian plus interpolation function derivatives. Returns 0 if no inverse exists.

◆ InterpolationFunctions()

void GetEdgeToAdjacentFacesArray::InterpolationFunctions ( const double pcoords[3],
double weights[4] )
static

◆ InterpolationDerivs()

void GetEdgeToAdjacentFacesArray::InterpolationDerivs ( const double pcoords[3],
double derivs[12] )
static

◆ InterpolateFunctions()

void GetEdgeToAdjacentFacesArray::InterpolateFunctions ( const double pcoords[3],
double weights[4] )
override

Compute the interpolation functions/derivatives (aka shape functions/derivatives).

Definition at line 156 of file vtkTetra.h.

◆ InterpolateDerivs()

void GetEdgeToAdjacentFacesArray::InterpolateDerivs ( const double pcoords[3],
double derivs[12] )
override

Compute the interpolation functions/derivatives (aka shape functions/derivatives).

Definition at line 160 of file vtkTetra.h.

◆ GetFaceToAdjacentFacesArray()

const vtkIdType * GetFaceToAdjacentFacesArray ( vtkIdType faceId)
static

Static method version of GetFaceToAdjacentFaces.

◆ GetPointToIncidentEdgesArray()

const vtkIdType * GetPointToIncidentEdgesArray ( vtkIdType pointId)
static

Static method version of GetPointToIncidentEdgesArray.

◆ GetPointToIncidentFacesArray()

const vtkIdType * GetPointToIncidentFacesArray ( vtkIdType pointId)
static

Static method version of GetPointToIncidentFacesArray.

◆ GetPointToOneRingPointsArray()

const vtkIdType * GetPointToOneRingPointsArray ( vtkIdType pointId)
static

Static method version of GetPointToOneRingPoints.

◆ ComputeCentroid()

bool ComputeCentroid ( vtkPoints * points,
const vtkIdType * pointIds,
double centroid[3] )
static

Static method version of GetCentroid.

◆ vtkTetra()

vtkTetra ( )
protected

◆ ~vtkTetra()

~vtkTetra ( )
overrideprotected

Variable Documentation

◆ NumberOfPoints

vtkIdType NumberOfPoints = 4
staticconstexpr

static constexpr handle on the number of points.

Definition at line 23 of file vtkTetra.h.

◆ NumberOfEdges

vtkIdType NumberOfEdges = 6
staticconstexpr

static contexpr handle on the number of faces.

Definition at line 28 of file vtkTetra.h.

◆ NumberOfFaces

vtkIdType NumberOfFaces = 4
staticconstexpr

static contexpr handle on the number of edges.

Definition at line 33 of file vtkTetra.h.

◆ MaximumFaceSize

vtkIdType MaximumFaceSize = 3
staticconstexpr

static contexpr handle on the maximum face size.

It can also be used to know the number of faces adjacent to one face.

Definition at line 39 of file vtkTetra.h.

◆ MaximumValence

vtkIdType MaximumValence = 3
staticconstexpr

static constexpr handle on the maximum valence of this cell.

The valence of a vertex is the number of incident edges (or equivalently faces) to this vertex. It is also equal to the size of a one ring neighborhood of a vertex.

Definition at line 46 of file vtkTetra.h.

◆ Line

vtkLine* Line
protected

Definition at line 248 of file vtkTetra.h.

◆ Triangle

vtkTriangle* Triangle
protected

Definition at line 249 of file vtkTetra.h.