VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQuadraticLinearQuad.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 =========================================================================*/ 00038 #ifndef vtkQuadraticLinearQuad_h 00039 #define vtkQuadraticLinearQuad_h 00040 00041 #include "vtkCommonDataModelModule.h" // For export macro 00042 #include "vtkNonLinearCell.h" 00043 00044 class vtkQuadraticEdge; 00045 class vtkLine; 00046 class vtkQuad; 00047 class vtkDoubleArray; 00048 00049 class VTKCOMMONDATAMODEL_EXPORT vtkQuadraticLinearQuad : public vtkNonLinearCell 00050 { 00051 public: 00052 static vtkQuadraticLinearQuad *New(); 00053 vtkTypeMacro(vtkQuadraticLinearQuad, vtkNonLinearCell); 00054 void PrintSelf(ostream & os, vtkIndent indent); 00055 00057 00059 int GetCellType () { return VTK_QUADRATIC_LINEAR_QUAD; }; 00060 int GetCellDimension () { return 2; } 00061 int GetNumberOfEdges () { return 4; } 00062 int GetNumberOfFaces () { return 0; } 00063 vtkCell *GetEdge (int); 00064 vtkCell *GetFace (int) { return 0; } 00066 00067 int CellBoundary (int subId, double pcoords[3], vtkIdList * pts); 00068 void Contour (double value, vtkDataArray * cellScalars, 00069 vtkIncrementalPointLocator * locator, vtkCellArray * verts, 00070 vtkCellArray * lines, vtkCellArray * polys, 00071 vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd, 00072 vtkIdType cellId, vtkCellData * outCd); 00073 int EvaluatePosition (double x[3], double *closestPoint, 00074 int &subId, double pcoords[3], double &dist2, double *weights); 00075 void EvaluateLocation (int &subId, double pcoords[3], double x[3], 00076 double *weights); 00077 int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts); 00078 void Derivatives (int subId, double pcoords[3], double *values, int dim, 00079 double *derivs); 00080 virtual double *GetParametricCoords (); 00081 00083 00085 void Clip (double value, vtkDataArray * cellScalars, 00086 vtkIncrementalPointLocator * locator, vtkCellArray * polys, 00087 vtkPointData * inPd, vtkPointData * outPd, 00088 vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd, 00089 int insideOut); 00091 00093 00095 int IntersectWithLine (double p1[3], double p2[3], double tol, double &t, 00096 double x[3], double pcoords[3], int &subId); 00098 00100 int GetParametricCenter(double pcoords[3]); 00101 00104 static void InterpolationFunctions (double pcoords[3], double weights[6]); 00107 static void InterpolationDerivs (double pcoords[3], double derivs[12]); 00109 00111 virtual void InterpolateFunctions (double pcoords[3], double weights[6]) 00112 { 00113 vtkQuadraticLinearQuad::InterpolationFunctions(pcoords,weights); 00114 } 00115 virtual void InterpolateDerivs (double pcoords[3], double derivs[12]) 00116 { 00117 vtkQuadraticLinearQuad::InterpolationDerivs(pcoords,derivs); 00118 } 00120 00122 static int *GetEdgeArray(int edgeId); 00123 00124 protected: 00125 vtkQuadraticLinearQuad (); 00126 ~vtkQuadraticLinearQuad (); 00127 00128 vtkQuadraticEdge *Edge; 00129 vtkLine *LinEdge; 00130 vtkQuad *Quad; 00131 vtkDoubleArray *Scalars; 00132 00133 private: 00134 vtkQuadraticLinearQuad (const vtkQuadraticLinearQuad &); // Not implemented. 00135 void operator = (const vtkQuadraticLinearQuad &); // Not implemented. 00136 }; 00137 //---------------------------------------------------------------------------- 00138 inline int vtkQuadraticLinearQuad::GetParametricCenter(double pcoords[3]) 00139 { 00140 pcoords[0] = pcoords[1] = 0.5; 00141 pcoords[2] = 0.; 00142 return 0; 00143 } 00144 00145 #endif