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

vtkConvexPointSet.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkConvexPointSet.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 =========================================================================*/
00042 #ifndef __vtkConvexPointSet_h
00043 #define __vtkConvexPointSet_h
00044 
00045 #include "vtkCell3D.h"
00046 
00047 class vtkUnstructuredGrid;
00048 class vtkCellArray;
00049 class vtkTriangle;
00050 class vtkTetra;
00051 class vtkDoubleArray;
00052 
00053 class VTK_FILTERING_EXPORT vtkConvexPointSet : public vtkCell3D
00054 {
00055 public:
00056   static vtkConvexPointSet *New();
00057   vtkTypeRevisionMacro(vtkConvexPointSet,vtkCell3D);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061   virtual int HasFixedTopology() {return 0;}
00062 
00064 
00065   virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
00066   virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
00067   virtual double *GetParametricCoords();
00069 
00071   virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
00072 
00074 
00075   virtual int RequiresInitialization() {return 1;}
00076   virtual void Initialize();
00078 
00080 
00089   virtual int GetNumberOfEdges() {return 0;}
00090   virtual vtkCell *GetEdge(int) {return NULL;}
00091   virtual int GetNumberOfFaces();
00092   virtual vtkCell *GetFace(int faceId);
00094 
00096 
00098   virtual void Contour(double value, vtkDataArray *cellScalars, 
00099                        vtkPointLocator *locator, vtkCellArray *verts, 
00100                        vtkCellArray *lines, vtkCellArray *polys,
00101                        vtkPointData *inPd, vtkPointData *outPd,
00102                        vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00104 
00106 
00109   virtual void Clip(double value, vtkDataArray *cellScalars, 
00110                     vtkPointLocator *locator, vtkCellArray *connectivity,
00111                     vtkPointData *inPd, vtkPointData *outPd,
00112                     vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 
00113                     int insideOut);
00115 
00117 
00120   virtual int EvaluatePosition(double x[3], double* closestPoint,
00121                                int& subId, double pcoords[3],
00122                                double& dist2, double *weights);
00124 
00126 
00127   virtual void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00128                                 double *weights);
00130   
00132 
00134   virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00135                                 double x[3], double pcoords[3], int& subId);
00137 
00139   virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00140   
00142 
00144   virtual void Derivatives(int subId, double pcoords[3], double *values, 
00145                            int dim, double *derivs);
00147 
00151   virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00152   
00154   virtual int GetParametricCenter(double pcoords[3]);
00155 
00158   int IsPrimaryCell() {return 0;}
00159 
00160 protected:
00161   vtkConvexPointSet();
00162   ~vtkConvexPointSet();
00163 
00164   vtkTetra       *Tetra;
00165   vtkIdList      *TetraIds;
00166   vtkPoints      *TetraPoints;
00167   vtkDoubleArray *TetraScalars;
00168 
00169   vtkCellArray   *BoundaryTris;
00170   vtkTriangle    *Triangle;
00171   vtkDoubleArray *ParametricCoords;
00172 
00173 private:
00174   vtkConvexPointSet(const vtkConvexPointSet&);  // Not implemented.
00175   void operator=(const vtkConvexPointSet&);  // Not implemented.
00176 };
00177 
00178 //----------------------------------------------------------------------------
00179 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
00180 {
00181   pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
00182   return 0;
00183 }
00184 
00185 #endif
00186 
00187 
00188