Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkConvexPointSet.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkConvexPointSet.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 =========================================================================*/
    00043 #ifndef __vtkConvexPointSet_h
    00044 #define __vtkConvexPointSet_h
    00045
    00046 #include "vtkCell3D.h"
    00047
    00048 class vtkUnstructuredGrid;
    00049 class vtkCellArray;
    00050 class vtkTriangle;
    00051 class vtkTetra;
    00052 class vtkFloatArray;
    00053
    00054 class VTK_COMMON_EXPORT vtkConvexPointSet : public vtkCell3D
    00055 {
    00056 public:
    00057   static vtkConvexPointSet *New();
    00058   vtkTypeRevisionMacro(vtkConvexPointSet,vtkCell3D);
    00059
    00061
    00062   virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
    00063   virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
    00064   virtual float *GetParametricCoords();
    00066
    00068   virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
    00069
    00071
    00072   virtual int RequiresInitialization() {return 1;}
    00073   virtual void Initialize();
    00075
    00077
    00086   virtual int GetNumberOfEdges() {return 0;}
    00087   virtual vtkCell *GetEdge(int) {return NULL;}
    00088   virtual int GetNumberOfFaces();
    00089   virtual vtkCell *GetFace(int faceId);
    00091
    00093
    00095   virtual void Contour(float value, vtkDataArray *cellScalars,
    00096                        vtkPointLocator *locator, vtkCellArray *verts,
    00097                        vtkCellArray *lines, vtkCellArray *polys,
    00098                        vtkPointData *inPd, vtkPointData *outPd,
    00099                        vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
    00101
    00103
    00106   virtual void Clip(float value, vtkDataArray *cellScalars,
    00107                     vtkPointLocator *locator, vtkCellArray *connectivity,
    00108                     vtkPointData *inPd, vtkPointData *outPd,
    00109                     vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
    00110                     int insideOut);
    00112
    00114
    00117   virtual int EvaluatePosition(float x[3], float* closestPoint,
    00118                                int& subId, float pcoords[3],
    00119                                float& dist2, float *weights);
    00121
    00123
    00124   virtual void EvaluateLocation(int& subId, float pcoords[3], float x[3],
    00125                                 float *weights);
    00127
    00129
    00131   virtual int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
    00132                                 float x[3], float pcoords[3], int& subId);
    00134
    00136   virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
    00137
    00139
    00141   virtual void Derivatives(int subId, float pcoords[3], float *values,
    00142                            int dim, float *derivs);
    00144
    00148   virtual int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
    00149
    00151   virtual int GetParametricCenter(float pcoords[3]);
    00152
    00153 protected:
    00154   vtkConvexPointSet();
    00155   ~vtkConvexPointSet();
    00156
    00157   vtkTetra      *Tetra;
    00158   vtkIdList     *TetraIds;
    00159   vtkPoints     *TetraPoints;
    00160   vtkFloatArray *TetraScalars;
    00161
    00162   vtkCellArray  *BoundaryTris;
    00163   vtkTriangle   *Triangle;
    00164   vtkFloatArray *ParametricCoords;
    00165
    00166 private:
    00167   vtkConvexPointSet(const vtkConvexPointSet&);  // Not implemented.
    00168   void operator=(const vtkConvexPointSet&);  // Not implemented.
    00169 };
    00170
    00171 inline int vtkConvexPointSet::GetParametricCenter(float pcoords[3])
    00172 {
    00173   pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
    00174   return 0;
    00175 }
    00176
    00177 #endif
    00178
    00179
    00180