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