NAME
vtkTetra - a 3D cell that represents a tetrahedron
SYNOPSIS
#include "/opt/vtk-c++/common/vtkTetra.h"
class VTK_EXPORT vtkTetra : public vtkCell
vtkTetra();
vtkTetra(const vtkTetra& t);
static vtkTetra *New() {return new vtkTetra;};
const char *GetClassName() {return "vtkTetra";};
vtkCell *MakeObject() {return new vtkTetra(*this);};
int GetCellType() {return VTK_TETRA;};
int GetCellDimension() {return 3;};
int GetNumberOfEdges() {return 6;};
int GetNumberOfFaces() {return 4;};
vtkCell *GetEdge(int edgeId);
vtkCell *GetFace(int faceId);
int CellBoundary(int subId, float pcoords[3], vtkIdList& pts);
void Contour(float value, vtkFloatScalars *cellScalars,
vtkPointLocator *locator, vtkCellArray *verts,
vtkCellArray *lines, vtkCellArray *polys,
vtkPointData *inPd, vtkPointData *outPd);
void Clip(float value, vtkFloatScalars *cellScalars,
vtkPointLocator *locator, vtkCellArray *tetras,
vtkPointData *inPd, vtkPointData *outPd, int insideOut);
int EvaluatePosition(float x[3], float closestPoint[3],
int& subId, float pcoords[3],
float& dist2, float *weights);
void EvaluateLocation(int& subId, float pcoords[3], float x[3],
float *weights);
int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
float x[3], float pcoords[3], int& subId);
int Triangulate(int index, vtkIdList &ptIds, vtkFloatPoints &pts);
void Derivatives(int subId, float pcoords[3], float *values,
int dim, float *derivs);
static void TetraCenter(float p1[3], float p2[3], float p3[3], float p4[3],
float center[3]);
static float Circumsphere(float p1[3], float p2[3], float p3[3],
float p4[3], float center[3]);
static int BarycentricCoords(float x[3], float x1[3], float x2[3],
float x3[3], float x4[3], float bcoords[4]);
static void InterpolationFunctions(float pcoords[3], float weights[4]);
static void InterpolationDerivs(float derivs[12]);
void JacobianInverse(double **inverse, float derivs[12]);
DESCRIPTION
vtkTetra is a concrete implementation of vtkCell to represent a 3D tetrahedron.
vtkTetra()
Construct the tetra with four points.
vtkTetra(const vtkTetra& t)
Deep copy of cell.
void TetraCenter(float p1[3], float p2[3], float p3[3], float p4[3], float center[3]) Compute the center of the tetrahedron,
float Circumsphere(float x1[3], float x2[3], float x3[3], float x4[3], float center[3]) Compute the circumcenter (center[3]) and radius (method return value) of a tetrahedron defined by the four points x1, x2, x3, and x4.
int BarycentricCoords(float x[3], float x1[3], float x2[3], float x3[3], float x4[3], float bcoords[4])
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.
void JacobianInverse(double **inverse, float derivs[12]) Given parametric coordinates compute inverse Jacobian transformation matrix. Returns 9 elements of 3x3 inverse Jacobian plus interpolation function derivatives.
void Clip(float value, vtkFloatScalars *cellScalars,
vtkPointLocator *locator, vtkCellArray *tetras,
vtkPointData *inPd, vtkPointData *outPd, int insideOut)
Clip this tetra using scalar value provided. Like contouring, except that it cuts the tetra to produce other tetrahedra.