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

vtkQuadraticQuad.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticQuad.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 =========================================================================*/
00045 #ifndef __vtkQuadraticQuad_h
00046 #define __vtkQuadraticQuad_h
00047 
00048 #include "vtkNonLinearCell.h"
00049 
00050 class vtkPolyData;
00051 class vtkQuadraticEdge;
00052 class vtkQuad;
00053 class vtkPointData;
00054 class vtkCellData;
00055 class vtkDataArray;
00056 class vtkDoubleArray;
00057 
00058 class VTK_FILTERING_EXPORT vtkQuadraticQuad : public vtkNonLinearCell
00059 {
00060 public:
00061   static vtkQuadraticQuad *New();
00062   vtkTypeRevisionMacro(vtkQuadraticQuad,vtkNonLinearCell);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064 
00066 
00068   int GetCellType() {return VTK_QUADRATIC_QUAD;};
00069   int GetCellDimension() {return 2;}
00070   int GetNumberOfEdges() {return 4;}
00071   int GetNumberOfFaces() {return 0;}
00072   vtkCell *GetEdge(int);
00073   vtkCell *GetFace(int) {return 0;}
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 
00095   void Clip(double value, vtkDataArray *cellScalars, 
00096             vtkPointLocator *locator, vtkCellArray *polys,
00097             vtkPointData *inPd, vtkPointData *outPd,
00098             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00099             int insideOut);
00101 
00103 
00105   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00106                         double x[3], double pcoords[3], int& subId);
00108 
00109   
00111 
00112   static void InterpolationFunctions(double pcoords[3], double weights[8]);
00113   static void InterpolationDerivs(double pcoords[3], double derivs[16]);
00115 
00116 protected:
00117   vtkQuadraticQuad();
00118   ~vtkQuadraticQuad();
00119 
00120   vtkQuadraticEdge *Edge;
00121   vtkQuad          *Quad;
00122   vtkPointData     *PointData;
00123   vtkCellData      *CellData;
00124   vtkDoubleArray   *Scalars;
00125 
00126   void Subdivide(double *weights);
00127   void InterpolateAttributes(vtkPointData *inPd, vtkCellData *inCd,
00128                              vtkIdType cellId, double *weights);
00129 
00130 private:
00131   vtkQuadraticQuad(const vtkQuadraticQuad&);  // Not implemented.
00132   void operator=(const vtkQuadraticQuad&);  // Not implemented.
00133 };
00134 
00135 #endif
00136 
00137