Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkQuadraticWedge.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticWedge.h,v $
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 =========================================================================*/
00046 #ifndef __vtkQuadraticWedge_h
00047 #define __vtkQuadraticWedge_h
00048 
00049 #include "vtkNonLinearCell.h"
00050 
00051 class vtkPolyData;
00052 class vtkQuadraticEdge;
00053 class vtkQuadraticQuad;
00054 class vtkQuadraticTriangle;
00055 class vtkWedge;
00056 class vtkDoubleArray;
00057 
00058 class VTK_FILTERING_EXPORT vtkQuadraticWedge : public vtkNonLinearCell
00059 {
00060 public:
00061   static vtkQuadraticWedge *New();
00062   vtkTypeRevisionMacro(vtkQuadraticWedge,vtkNonLinearCell);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064 
00066 
00068   int GetCellType() {return VTK_QUADRATIC_WEDGE;}
00069   int GetCellDimension() {return 3;}
00070   int GetNumberOfEdges() {return 9;}
00071   int GetNumberOfFaces() {return 5;}
00072   vtkCell *GetEdge(int edgeId);
00073   vtkCell *GetFace(int faceId);
00075 
00076   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00077   void Contour(double value, vtkDataArray *cellScalars, 
00078                vtkPointLocator *locator, vtkCellArray *verts, 
00079                vtkCellArray *lines, vtkCellArray *polys, 
00080                vtkPointData *inPd, vtkPointData *outPd,
00081                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00082   int EvaluatePosition(double x[3], double* closestPoint,
00083                        int& subId, double pcoords[3], 
00084                        double& dist2, double *weights);
00085   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00086                         double *weights);
00087   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00088   void Derivatives(int subId, double pcoords[3], double *values, 
00089                    int dim, double *derivs);
00090   virtual double *GetParametricCoords();
00091 
00093 
00096   void Clip(double value, vtkDataArray *cellScalars, 
00097             vtkPointLocator *locator, vtkCellArray *tetras,
00098             vtkPointData *inPd, vtkPointData *outPd,
00099             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00100             int insideOut);
00102 
00104 
00106   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00107                         double x[3], double pcoords[3], int& subId);
00109 
00110   
00112   int GetParametricCenter(double pcoords[3]);
00113 
00115 
00116   static void InterpolationFunctions(double pcoords[3], double weights[15]);
00117   static void InterpolationDerivs(double pcoords[3], double derivs[45]);
00119 
00123   void JacobianInverse(double pcoords[3], double **inverse, double derivs[45]);
00124 
00125 protected:
00126   vtkQuadraticWedge();
00127   ~vtkQuadraticWedge();
00128 
00129   vtkQuadraticEdge *Edge;
00130   vtkQuadraticTriangle *TriangleFace;
00131   vtkQuadraticQuad *Face;
00132   vtkWedge         *Wedge;
00133   vtkPointData     *PointData;
00134   vtkCellData      *CellData;
00135   vtkDoubleArray   *Scalars; //used to avoid New/Delete in contouring/clipping
00136   
00137   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId);
00138 
00139 private:
00140   vtkQuadraticWedge(const vtkQuadraticWedge&);  // Not implemented.
00141   void operator=(const vtkQuadraticWedge&);  // Not implemented.
00142 };
00143 
00144 #endif
00145 
00146