VTK
dox/Filtering/vtkVertex.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkVertex.h
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 =========================================================================*/
00027 #ifndef __vtkVertex_h
00028 #define __vtkVertex_h
00029 
00030 #include "vtkCell.h"
00031 
00032 class vtkIncrementalPointLocator;
00033 
00034 class VTK_FILTERING_EXPORT vtkVertex : public vtkCell
00035 {
00036 public:
00037   static vtkVertex *New();
00038   vtkTypeMacro(vtkVertex,vtkCell);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00045   int GetCellType() {return VTK_VERTEX;};
00046   int GetCellDimension() {return 0;};
00047   int GetNumberOfEdges() {return 0;};
00048   int GetNumberOfFaces() {return 0;};
00049   vtkCell *GetEdge(int) {return 0;};
00050   vtkCell *GetFace(int) {return 0;};
00051   void Clip(double value, vtkDataArray *cellScalars,
00052             vtkIncrementalPointLocator *locator, vtkCellArray *pts,
00053             vtkPointData *inPd, vtkPointData *outPd,
00054             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00055             int insideOut);
00056   int EvaluatePosition(double x[3], double* closestPoint,
00057                        int& subId, double pcoords[3],
00058                        double& dist2, double *weights);
00059   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00060                         double *weights);
00061   virtual double *GetParametricCoords();
00063 
00069   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00070 
00072 
00076   void Contour(double value, vtkDataArray *cellScalars,
00077                vtkIncrementalPointLocator *locator, vtkCellArray *verts1,
00078                vtkCellArray *lines, vtkCellArray *verts2,
00079                vtkPointData *inPd, vtkPointData *outPd,
00080                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00082 
00084   int GetParametricCenter(double pcoords[3]);
00085 
00087 
00090   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00091                         double x[3], double pcoords[3], int& subId);
00093 
00096   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00097 
00099 
00101   void Derivatives(int subId, double pcoords[3], double *values,
00102                    int dim, double *derivs);
00104 
00106   static void InterpolationFunctions(double pcoords[3], double weights[1]);
00108   static void InterpolationDerivs(double pcoords[3], double derivs[3]);
00110 
00112   virtual void InterpolateFunctions(double pcoords[3], double weights[1])
00113     {
00114     vtkVertex::InterpolationFunctions(pcoords,weights);
00115     }
00116   virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
00117     {
00118     vtkVertex::InterpolationDerivs(pcoords,derivs);
00119     }
00121 
00122 protected:
00123   vtkVertex();
00124   ~vtkVertex() {};
00125 
00126 private:
00127   vtkVertex(const vtkVertex&);  // Not implemented.
00128   void operator=(const vtkVertex&);  // Not implemented.
00129 };
00130 
00131 //----------------------------------------------------------------------------
00132 inline int vtkVertex::GetParametricCenter(double pcoords[3])
00133 {
00134   pcoords[0] = pcoords[1] = pcoords[2] = 0.0;
00135   return 0;
00136 }
00137 
00138 #endif
00139 
00140