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

vtkQuadraticEdge.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticEdge.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 =========================================================================*/
00033 #ifndef __vtkQuadraticEdge_h
00034 #define __vtkQuadraticEdge_h
00035 
00036 #include "vtkNonLinearCell.h"
00037 
00038 class vtkLine;
00039 
00040 class VTK_FILTERING_EXPORT vtkQuadraticEdge : public vtkNonLinearCell
00041 {
00042 public:
00043   static vtkQuadraticEdge *New();
00044   vtkTypeRevisionMacro(vtkQuadraticEdge,vtkNonLinearCell);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048 
00050   int GetCellType() {return VTK_QUADRATIC_EDGE;};
00051   int GetCellDimension() {return 1;}
00052   int GetNumberOfEdges() {return 0;}
00053   int GetNumberOfFaces() {return 0;}
00054   vtkCell *GetEdge(int) {return 0;}
00055   vtkCell *GetFace(int) {return 0;}
00057 
00058   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00059   void Contour(double value, vtkDataArray *cellScalars, 
00060                vtkPointLocator *locator, vtkCellArray *verts, 
00061                vtkCellArray *lines, vtkCellArray *polys, 
00062                vtkPointData *inPd, vtkPointData *outPd,
00063                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00064   int EvaluatePosition(double x[3], double* closestPoint,
00065                        int& subId, double pcoords[3], 
00066                        double& dist2, double *weights);
00067   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00068                         double *weights);
00069   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00070   void Derivatives(int subId, double pcoords[3], double *values, 
00071                    int dim, double *derivs);
00072   virtual double *GetParametricCoords();
00073 
00075 
00077   void Clip(double value, vtkDataArray *cellScalars, 
00078             vtkPointLocator *locator, vtkCellArray *lines,
00079             vtkPointData *inPd, vtkPointData *outPd,
00080             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00081             int insideOut);
00083 
00085 
00087   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00088                         double x[3], double pcoords[3], int& subId);
00090 
00092   int GetParametricCenter(double pcoords[3]);
00093   
00095 
00096   static void InterpolationFunctions(double pcoords[3], double weights[3]);
00097   static void InterpolationDerivs(double pcoords[3], double derivs[3]);
00099 
00100 protected:
00101   vtkQuadraticEdge();
00102   ~vtkQuadraticEdge();
00103 
00104   vtkLine *Line;
00105   vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
00106 
00107 private:
00108   vtkQuadraticEdge(const vtkQuadraticEdge&);  // Not implemented.
00109   void operator=(const vtkQuadraticEdge&);  // Not implemented.
00110 };
00111 //----------------------------------------------------------------------------
00112 inline int vtkQuadraticEdge::GetParametricCenter(double pcoords[3])
00113 {
00114   pcoords[0] = 0.5;
00115   pcoords[1] = pcoords[2] = 0.;
00116   return 0;
00117 }
00118 
00119 #endif
00120 
00121 

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