VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/vtkConvexPointSet.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkConvexPointSet.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 =========================================================================*/
00032 #ifndef vtkConvexPointSet_h
00033 #define vtkConvexPointSet_h
00034 
00035 #include "vtkCommonDataModelModule.h" // For export macro
00036 #include "vtkCell3D.h"
00037 
00038 class vtkUnstructuredGrid;
00039 class vtkCellArray;
00040 class vtkTriangle;
00041 class vtkTetra;
00042 class vtkDoubleArray;
00043 
00044 class VTKCOMMONDATAMODEL_EXPORT vtkConvexPointSet : public vtkCell3D
00045 {
00046 public:
00047   static vtkConvexPointSet *New();
00048   vtkTypeMacro(vtkConvexPointSet,vtkCell3D);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052   virtual int HasFixedTopology() {return 0;}
00053 
00055 
00056   virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
00057   virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
00058   virtual double *GetParametricCoords();
00060 
00062   virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
00063 
00065 
00066   virtual int RequiresInitialization() {return 1;}
00067   virtual void Initialize();
00069 
00071 
00080   virtual int GetNumberOfEdges() {return 0;}
00081   virtual vtkCell *GetEdge(int) {return NULL;}
00082   virtual int GetNumberOfFaces();
00083   virtual vtkCell *GetFace(int faceId);
00085 
00087 
00089   virtual void Contour(double value, vtkDataArray *cellScalars,
00090                        vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00091                        vtkCellArray *lines, vtkCellArray *polys,
00092                        vtkPointData *inPd, vtkPointData *outPd,
00093                        vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00095 
00097 
00100   virtual void Clip(double value, vtkDataArray *cellScalars,
00101                     vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
00102                     vtkPointData *inPd, vtkPointData *outPd,
00103                     vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00104                     int insideOut);
00106 
00108 
00111   virtual int EvaluatePosition(double x[3], double* closestPoint,
00112                                int& subId, double pcoords[3],
00113                                double& dist2, double *weights);
00115 
00117 
00118   virtual void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00119                                 double *weights);
00121 
00123 
00125   virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00126                                 double x[3], double pcoords[3], int& subId);
00128 
00130   virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00131 
00133 
00135   virtual void Derivatives(int subId, double pcoords[3], double *values,
00136                            int dim, double *derivs);
00138 
00142   virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00143 
00145   virtual int GetParametricCenter(double pcoords[3]);
00146 
00149   int IsPrimaryCell() {return 0;}
00150 
00152 
00154   virtual void InterpolateFunctions(double pcoords[3], double *sf);
00155   virtual void InterpolateDerivs(double pcoords[3], double *derivs);
00157 
00158 protected:
00159   vtkConvexPointSet();
00160   ~vtkConvexPointSet();
00161 
00162   vtkTetra       *Tetra;
00163   vtkIdList      *TetraIds;
00164   vtkPoints      *TetraPoints;
00165   vtkDoubleArray *TetraScalars;
00166 
00167   vtkCellArray   *BoundaryTris;
00168   vtkTriangle    *Triangle;
00169   vtkDoubleArray *ParametricCoords;
00170 
00171 private:
00172   vtkConvexPointSet(const vtkConvexPointSet&);  // Not implemented.
00173   void operator=(const vtkConvexPointSet&);  // Not implemented.
00174 };
00175 
00176 //----------------------------------------------------------------------------
00177 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
00178 {
00179   pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
00180   return 0;
00181 }
00182 
00183 #endif
00184 
00185 
00186