VTK
vtkQuadraticTetra.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticTetra.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef __vtkQuadraticTetra_h
36 #define __vtkQuadraticTetra_h
37 
38 #include "vtkNonLinearCell.h"
39 
40 class vtkQuadraticEdge;
42 class vtkTetra;
43 class vtkDoubleArray;
44 
46 {
47 public:
48  static vtkQuadraticTetra *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
56  int GetCellDimension() {return 3;}
57  int GetNumberOfEdges() {return 6;}
58  int GetNumberOfFaces() {return 4;}
59  vtkCell *GetEdge(int);
60  vtkCell *GetFace(int);
62 
63  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
64  void Contour(double value, vtkDataArray *cellScalars,
66  vtkCellArray *lines, vtkCellArray *polys,
67  vtkPointData *inPd, vtkPointData *outPd,
68  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
69  int EvaluatePosition(double x[3], double* closestPoint,
70  int& subId, double pcoords[3],
71  double& dist2, double *weights);
72  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
73  double *weights);
74  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
75  void Derivatives(int subId, double pcoords[3], double *values,
76  int dim, double *derivs);
77  virtual double *GetParametricCoords();
78 
80 
82  void Clip(double value, vtkDataArray *cellScalars,
83  vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
84  vtkPointData *inPd, vtkPointData *outPd,
85  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
86  int insideOut);
88 
90 
92  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
93  double x[3], double pcoords[3], int& subId);
95 
96 
98  int GetParametricCenter(double pcoords[3]);
99 
102  double GetParametricDistance(double pcoords[3]);
103 
105 
107  static void InterpolationFunctions(double pcoords[3], double weights[10]);
108  // Description:
109  // @deprecated Replaced by vtkQuadraticTetra::InterpolateDerivs as of VTK 5.2
110  static void InterpolationDerivs(double pcoords[3], double derivs[30]);
111  // Description:
112  // Compute the interpolation functions/derivatives
113  // (aka shape functions/derivatives)
114  virtual void InterpolateFunctions(double pcoords[3], double weights[10])
115  {
117  }
118  virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
119  {
121  }
122  // Description:
123  // Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
124  // Ids are related to the cell, not to the dataset.
125  static int *GetEdgeArray(int edgeId);
126  static int *GetFaceArray(int faceId);
128 
132  void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
133 
134 protected:
137 
141  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
142 
143 private:
144  vtkQuadraticTetra(const vtkQuadraticTetra&); // Not implemented.
145  void operator=(const vtkQuadraticTetra&); // Not implemented.
146 };
147 
148 #endif
149 
150 
represent and manipulate point attribute data
Definition: vtkPointData.h:35
#define VTK_FILTERING_EXPORT
virtual void InterpolateFunctions(double pcoords[3], double weights[10])
virtual double * GetParametricCoords()
vtkDoubleArray * Scalars
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
Abstract class in support of both point location and point insertion.
vtkQuadraticEdge * Edge
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
abstract superclass for non-linear cells
int vtkIdType
Definition: vtkType.h:255
vtkQuadraticTriangle * Face
static void InterpolationDerivs(double pcoords[3], double derivs[30])
dynamic, self-adjusting array of double
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:45
abstract class to specify cell behavior
Definition: vtkCell.h:57
virtual double GetParametricDistance(double pcoords[3])
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
cell represents a parabolic, 10-node isoparametric tetrahedron
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
void PrintSelf(ostream &os, vtkIndent indent)
virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:48
static void InterpolationFunctions(double pcoords[3], double weights[10])
virtual vtkCell * GetEdge(int edgeId)=0
cell represents a parabolic, isoparametric edge
virtual void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)=0
cell represents a parabolic, isoparametric triangle
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
represent and manipulate 3D points
Definition: vtkPoints.h:38