Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00049 #ifndef __vtkQuadraticQuad_h
00050 #define __vtkQuadraticQuad_h
00051 
00052 #include "vtkNonLinearCell.h"
00053 
00054 class vtkPolyData;
00055 class vtkQuadraticEdge;
00056 class vtkQuad;
00057 class vtkPointData;
00058 class vtkCellData;
00059 
00060 class VTK_COMMON_EXPORT vtkQuadraticQuad : public vtkNonLinearCell
00061 {
00062 public:
00063   static vtkQuadraticQuad *New();
00064   vtkTypeRevisionMacro(vtkQuadraticQuad,vtkNonLinearCell);
00065 
00067 
00069   int GetCellType() {return VTK_QUADRATIC_QUAD;};
00070   int GetCellDimension() {return 2;}
00071   int GetNumberOfEdges() {return 4;}
00072   int GetNumberOfFaces() {return 0;}
00073   vtkCell *GetEdge(int);
00074   vtkCell *GetFace(int) {return 0;}
00076 
00077   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00078   void Contour(float value, vtkDataArray *cellScalars, 
00079                vtkPointLocator *locator, vtkCellArray *verts, 
00080                vtkCellArray *lines, vtkCellArray *polys, 
00081                vtkPointData *inPd, vtkPointData *outPd,
00082                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00083   int EvaluatePosition(float x[3], float* closestPoint,
00084                        int& subId, float pcoords[3], 
00085                        float& dist2, float *weights);
00086   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00087                         float *weights);
00088   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00089   void Derivatives(int subId, float pcoords[3], float *values, 
00090                    int dim, float *derivs);
00091 
00093 
00095   void Clip(float 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(float p1[3], float p2[3], float tol, float& t,
00106                         float x[3], float pcoords[3], int& subId);
00108 
00109   
00111 
00112   static void InterpolationFunctions(float pcoords[3], float weights[8]);
00113   static void InterpolationDerivs(float pcoords[3], float derivs[16]);
00115 
00116 protected:
00117   vtkQuadraticQuad();
00118   ~vtkQuadraticQuad();
00119 
00120   vtkQuadraticEdge *Edge;
00121   vtkQuad          *Quad;
00122   vtkPointData     *PointData;
00123   vtkCellData      *CellData;
00124   vtkFloatArray    *Scalars;
00125 
00126   void Subdivide(float *weights);
00127   void InterpolateAttributes(vtkPointData *inPd, vtkCellData *inCd,
00128                              vtkIdType cellId, float *weights);
00129 
00130 private:
00131   vtkQuadraticQuad(const vtkQuadraticQuad&);  // Not implemented.
00132   void operator=(const vtkQuadraticQuad&);  // Not implemented.
00133 };
00134 
00135 #endif
00136 
00137