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

Common/vtkQuadraticQuad.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticQuad.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00050 #ifndef __vtkQuadraticQuad_h
00051 #define __vtkQuadraticQuad_h
00052 
00053 #include "vtkNonLinearCell.h"
00054 
00055 class vtkPolyData;
00056 class vtkQuadraticEdge;
00057 class vtkQuad;
00058 class vtkPointData;
00059 class vtkCellData;
00060 
00061 class VTK_COMMON_EXPORT vtkQuadraticQuad : public vtkNonLinearCell
00062 {
00063 public:
00064   static vtkQuadraticQuad *New();
00065   vtkTypeRevisionMacro(vtkQuadraticQuad,vtkNonLinearCell);
00066 
00068 
00070   int GetCellType() {return VTK_QUADRATIC_QUAD;};
00071   int GetCellDimension() {return 2;}
00072   int GetNumberOfEdges() {return 4;}
00073   int GetNumberOfFaces() {return 0;}
00074   vtkCell *GetEdge(int);
00075   vtkCell *GetFace(int) {return 0;}
00077 
00078   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00079   void Contour(float value, vtkDataArray *cellScalars, 
00080                vtkPointLocator *locator, vtkCellArray *verts, 
00081                vtkCellArray *lines, vtkCellArray *polys, 
00082                vtkPointData *inPd, vtkPointData *outPd,
00083                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00084   int EvaluatePosition(float x[3], float* closestPoint,
00085                        int& subId, float pcoords[3], 
00086                        float& dist2, float *weights);
00087   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00088                         float *weights);
00089   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00090   void Derivatives(int subId, float pcoords[3], float *values, 
00091                    int dim, float *derivs);
00092 
00094 
00096   void Clip(float value, vtkDataArray *cellScalars, 
00097             vtkPointLocator *locator, vtkCellArray *polys,
00098             vtkPointData *inPd, vtkPointData *outPd,
00099             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00100             int insideOut);
00102 
00104 
00106   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00107                         float x[3], float pcoords[3], int& subId);
00109 
00110   
00112 
00113   static void InterpolationFunctions(float pcoords[3], float weights[8]);
00114   static void InterpolationDerivs(float pcoords[3], float derivs[16]);
00116 
00117 protected:
00118   vtkQuadraticQuad();
00119   ~vtkQuadraticQuad();
00120 
00121   vtkQuadraticEdge *Edge;
00122   vtkQuad          *Quad;
00123   vtkPointData     *PointData;
00124   vtkCellData      *CellData;
00125   vtkFloatArray    *Scalars;
00126 
00127   void Subdivide(float *weights);
00128   void InterpolateAttributes(vtkPointData *inPd, vtkCellData *inCd,
00129                              vtkIdType cellId, float *weights);
00130 
00131 private:
00132   vtkQuadraticQuad(const vtkQuadraticQuad&);  // Not implemented.
00133   void operator=(const vtkQuadraticQuad&);  // Not implemented.
00134 };
00135 
00136 #endif
00137 
00138