VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQuadraticTetra.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00035 #ifndef __vtkQuadraticTetra_h 00036 #define __vtkQuadraticTetra_h 00037 00038 #include "vtkNonLinearCell.h" 00039 00040 class vtkQuadraticEdge; 00041 class vtkQuadraticTriangle; 00042 class vtkTetra; 00043 class vtkDoubleArray; 00044 00045 class VTK_FILTERING_EXPORT vtkQuadraticTetra : public vtkNonLinearCell 00046 { 00047 public: 00048 static vtkQuadraticTetra *New(); 00049 vtkTypeMacro(vtkQuadraticTetra,vtkNonLinearCell); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00055 int GetCellType() {return VTK_QUADRATIC_TETRA;} 00056 int GetCellDimension() {return 3;} 00057 int GetNumberOfEdges() {return 6;} 00058 int GetNumberOfFaces() {return 4;} 00059 vtkCell *GetEdge(int); 00060 vtkCell *GetFace(int); 00062 00063 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts); 00064 void Contour(double value, vtkDataArray *cellScalars, 00065 vtkIncrementalPointLocator *locator, vtkCellArray *verts, 00066 vtkCellArray *lines, vtkCellArray *polys, 00067 vtkPointData *inPd, vtkPointData *outPd, 00068 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd); 00069 int EvaluatePosition(double x[3], double* closestPoint, 00070 int& subId, double pcoords[3], 00071 double& dist2, double *weights); 00072 void EvaluateLocation(int& subId, double pcoords[3], double x[3], 00073 double *weights); 00074 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts); 00075 void Derivatives(int subId, double pcoords[3], double *values, 00076 int dim, double *derivs); 00077 virtual double *GetParametricCoords(); 00078 00080 00082 void Clip(double value, vtkDataArray *cellScalars, 00083 vtkIncrementalPointLocator *locator, vtkCellArray *tetras, 00084 vtkPointData *inPd, vtkPointData *outPd, 00085 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 00086 int insideOut); 00088 00090 00092 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t, 00093 double x[3], double pcoords[3], int& subId); 00095 00096 00098 int GetParametricCenter(double pcoords[3]); 00099 00102 double GetParametricDistance(double pcoords[3]); 00103 00106 static void InterpolationFunctions(double pcoords[3], double weights[10]); 00109 static void InterpolationDerivs(double pcoords[3], double derivs[30]); 00111 00113 virtual void InterpolateFunctions(double pcoords[3], double weights[10]) 00114 { 00115 vtkQuadraticTetra::InterpolationFunctions(pcoords,weights); 00116 } 00117 virtual void InterpolateDerivs(double pcoords[3], double derivs[30]) 00118 { 00119 vtkQuadraticTetra::InterpolationDerivs(pcoords,derivs); 00120 } 00122 00123 00125 static int *GetEdgeArray(int edgeId); 00126 static int *GetFaceArray(int faceId); 00128 00132 void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]); 00133 00134 protected: 00135 vtkQuadraticTetra(); 00136 ~vtkQuadraticTetra(); 00137 00138 vtkQuadraticEdge *Edge; 00139 vtkQuadraticTriangle *Face; 00140 vtkTetra *Tetra; 00141 vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping 00142 00143 private: 00144 vtkQuadraticTetra(const vtkQuadraticTetra&); // Not implemented. 00145 void operator=(const vtkQuadraticTetra&); // Not implemented. 00146 }; 00147 00148 #endif 00149 00150