Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00035 #ifndef __vtkQuadraticQuad_h
00036 #define __vtkQuadraticQuad_h
00037 
00038 #include "vtkNonLinearCell.h"
00039 
00040 class vtkQuadraticEdge;
00041 class vtkQuad;
00042 
00043 class VTK_FILTERING_EXPORT vtkQuadraticQuad : public vtkNonLinearCell
00044 {
00045 public:
00046   static vtkQuadraticQuad *New();
00047   vtkTypeRevisionMacro(vtkQuadraticQuad,vtkNonLinearCell);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00053   int GetCellType() {return VTK_QUADRATIC_QUAD;};
00054   int GetCellDimension() {return 2;}
00055   int GetNumberOfEdges() {return 4;}
00056   int GetNumberOfFaces() {return 0;}
00057   vtkCell *GetEdge(int);
00058   vtkCell *GetFace(int) {return 0;}
00060 
00061   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00062   void Contour(double value, vtkDataArray *cellScalars, 
00063                vtkPointLocator *locator, vtkCellArray *verts, 
00064                vtkCellArray *lines, vtkCellArray *polys, 
00065                vtkPointData *inPd, vtkPointData *outPd,
00066                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00067   int EvaluatePosition(double x[3], double* closestPoint,
00068                        int& subId, double pcoords[3], 
00069                        double& dist2, double *weights);
00070   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00071                         double *weights);
00072   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00073   void Derivatives(int subId, double pcoords[3], double *values, 
00074                    int dim, double *derivs);
00075   virtual double *GetParametricCoords();
00076 
00078 
00080   void Clip(double value, vtkDataArray *cellScalars, 
00081             vtkPointLocator *locator, vtkCellArray *polys,
00082             vtkPointData *inPd, vtkPointData *outPd,
00083             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00084             int insideOut);
00086 
00088 
00090   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00091                         double x[3], double pcoords[3], int& subId);
00093 
00094   
00096   int GetParametricCenter(double pcoords[3]);
00097 
00099 
00100   static void InterpolationFunctions(double pcoords[3], double weights[8]);
00101   static void InterpolationDerivs(double pcoords[3], double derivs[16]);
00103 
00104 protected:
00105   vtkQuadraticQuad();
00106   ~vtkQuadraticQuad();
00107 
00108   vtkQuadraticEdge *Edge;
00109   vtkQuad          *Quad;
00110   vtkPointData     *PointData;
00111   vtkDoubleArray   *Scalars;
00112 
00113   // In order to achieve some functionality we introduce a fake center point
00114   // which require to have some extra functionalities compare to other non-linar
00115   // cells
00116   vtkCellData      *CellData;
00117   vtkDoubleArray   *CellScalars;
00118   void Subdivide(double *weights);
00119   void InterpolateAttributes(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
00120     vtkDataArray *cellScalars);
00121 
00122 private:
00123   vtkQuadraticQuad(const vtkQuadraticQuad&);  // Not implemented.
00124   void operator=(const vtkQuadraticQuad&);  // Not implemented.
00125 };
00126 //----------------------------------------------------------------------------
00127 inline int vtkQuadraticQuad::GetParametricCenter(double pcoords[3])
00128 {
00129   pcoords[0] = pcoords[1] = 0.5;
00130   pcoords[2] = 0.;
00131   return 0;
00132 }
00133 
00134 #endif
00135 
00136 

Generated on Mon Jan 21 23:07:21 2008 for VTK by  doxygen 1.4.3-20050530