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

vtkQuadraticTriangle.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticTriangle.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 =========================================================================*/
00039 #ifndef __vtkQuadraticTriangle_h
00040 #define __vtkQuadraticTriangle_h
00041 
00042 #include "vtkNonLinearCell.h"
00043 
00044 class vtkPolyData;
00045 class vtkQuadraticEdge;
00046 class vtkTriangle;
00047 
00048 class VTK_COMMON_EXPORT vtkQuadraticTriangle : public vtkNonLinearCell
00049 {
00050 public:
00051   static vtkQuadraticTriangle *New();
00052   vtkTypeRevisionMacro(vtkQuadraticTriangle,vtkNonLinearCell);
00053 
00055 
00057   int GetCellType() {return VTK_QUADRATIC_TRIANGLE;};
00058   int GetCellDimension() {return 2;}
00059   int GetNumberOfEdges() {return 3;}
00060   int GetNumberOfFaces() {return 0;}
00061   vtkCell *GetEdge(int edgeId);
00062   vtkCell *GetFace(int) {return 0;}
00064 
00065   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00066   void Contour(float value, vtkDataArray *cellScalars, 
00067                vtkPointLocator *locator, vtkCellArray *verts, 
00068                vtkCellArray *lines, vtkCellArray *polys, 
00069                vtkPointData *inPd, vtkPointData *outPd,
00070                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00071   int EvaluatePosition(float x[3], float* closestPoint,
00072                        int& subId, float pcoords[3], 
00073                        float& dist2, float *weights);
00074   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00075                         float *weights);
00076   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00077   void Derivatives(int subId, float pcoords[3], float *values, 
00078                    int dim, float *derivs);
00079 
00081 
00084   void Clip(float value, vtkDataArray *cellScalars, 
00085             vtkPointLocator *locator, vtkCellArray *polys,
00086             vtkPointData *inPd, vtkPointData *outPd,
00087             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00088             int insideOut);
00090 
00092 
00094   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00095                         float x[3], float pcoords[3], int& subId);
00097 
00098   
00101   int GetParametricCenter(float pcoords[3]);
00102 
00104 
00105   static void InterpolationFunctions(float pcoords[3], float weights[3]);
00106   static void InterpolationDerivs(float pcoords[3], float derivs[3]);
00108 
00109 protected:
00110   vtkQuadraticTriangle();
00111   ~vtkQuadraticTriangle();
00112 
00113   vtkQuadraticEdge *Edge;
00114   vtkTriangle      *Face;
00115   vtkFloatArray    *Scalars; //used to avoid New/Delete in contouring/clipping
00116 
00117 private:
00118   vtkQuadraticTriangle(const vtkQuadraticTriangle&);  // Not implemented.
00119   void operator=(const vtkQuadraticTriangle&);  // Not implemented.
00120 };
00121 
00122 #endif
00123 
00124