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

Common/vtkQuad.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuad.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 =========================================================================*/
00030 #ifndef __vtkQuad_h
00031 #define __vtkQuad_h
00032 
00033 #include "vtkCell.h"
00034 
00035 class vtkLine;
00036 class vtkTriangle;
00037 
00038 class VTK_COMMON_EXPORT vtkQuad : public vtkCell
00039 {
00040 public:
00041   static vtkQuad *New();
00042   vtkTypeRevisionMacro(vtkQuad,vtkCell);
00043 
00045 
00046   int GetCellType() {return VTK_QUAD;};
00047   int GetCellDimension() {return 2;};
00048   int GetNumberOfEdges() {return 4;};
00049   int GetNumberOfFaces() {return 0;};
00050   vtkCell *GetEdge(int edgeId);
00051   vtkCell *GetFace(int) {return 0;};
00052   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00053   void Contour(double value, vtkDataArray *cellScalars, 
00054                vtkPointLocator *locator, vtkCellArray *verts, 
00055                vtkCellArray *lines, vtkCellArray *polys,
00056                vtkPointData *inPd, vtkPointData *outPd,
00057                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00058   int EvaluatePosition(double x[3], double* closestPoint,
00059                        int& subId, double pcoords[3],
00060                        double& dist2, double *weights);
00061   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00062                         double *weights);
00063   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00064                         double x[3], double pcoords[3], int& subId);
00065   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00066   void Derivatives(int subId, double pcoords[3], double *values, 
00067                    int dim, double *derivs);
00068   virtual double *GetParametricCoords();
00070 
00072 
00074   void Clip(double value, vtkDataArray *cellScalars, 
00075             vtkPointLocator *locator, vtkCellArray *polys,
00076             vtkPointData *inPd, vtkPointData *outPd,
00077             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00078             int insideOut);
00080 
00082 
00083   static void InterpolationFunctions(double pcoords[3], double sf[4]);
00084   static void InterpolationDerivs(double pcoords[3], double derivs[8]);
00086 
00087 protected:
00088   vtkQuad();
00089   ~vtkQuad();
00090 
00091   vtkLine     *Line;
00092   vtkTriangle *Triangle;
00093 
00094 private:
00095   vtkQuad(const vtkQuad&);  // Not implemented.
00096   void operator=(const vtkQuad&);  // Not implemented.
00097 };
00098 
00099 #endif
00100 
00101