Common/vtkVoxel.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00030 #ifndef __vtkVoxel_h
00031 #define __vtkVoxel_h
00032 
00033 #include "vtkCell3D.h"
00034 
00035 class vtkLine;
00036 class vtkPixel;
00037 
00038 class VTK_COMMON_EXPORT vtkVoxel : public vtkCell3D
00039 {
00040 public:
00041   static vtkVoxel *New();
00042   vtkTypeRevisionMacro(vtkVoxel,vtkCell3D);
00043 
00045 
00046   virtual void GetEdgePoints(int edgeId, int* &pts);
00047   virtual void GetFacePoints(int faceId, int* &pts);
00048   virtual double *GetParametricCoords();
00050 
00052 
00053   int GetCellType() {return VTK_VOXEL;}
00054   int GetCellDimension() {return 3;}
00055   int GetNumberOfEdges() {return 12;}
00056   int GetNumberOfFaces() {return 6;}
00057   vtkCell *GetEdge(int edgeId);
00058   vtkCell *GetFace(int faceId);
00059   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00060   void Contour(double value, vtkDataArray *cellScalars, 
00061                vtkPointLocator *locator, vtkCellArray *verts, 
00062                vtkCellArray *lines, vtkCellArray *polys,
00063                vtkPointData *inPd, vtkPointData *outPd,
00064                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00065   int EvaluatePosition(double x[3], double* closestPoint,
00066                        int& subId, double pcoords[3],
00067                        double& dist2, double *weights);
00068   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00069                         double *weights);
00070   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00071                         double x[3], double pcoords[3], int& subId);
00072   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00073   void Derivatives(int subId, double pcoords[3], double *values, 
00074                    int dim, double *derivs);
00076 
00078 
00079   static void InterpolationFunctions(double pcoords[3], double weights[8]);
00080   static void InterpolationDerivs(double pcoords[3], double derivs[24]);
00081   static int *GetEdgeArray(int edgeId);
00082   static int *GetFaceArray(int faceId);
00084 
00085 protected:
00086   vtkVoxel();
00087   ~vtkVoxel();
00088 
00089   vtkLine *Line;
00090   vtkPixel *Pixel;
00091   
00092 private:
00093   vtkVoxel(const vtkVoxel&);  
00094   void operator=(const vtkVoxel&);  
00095 };
00096 
00097 #endif
00098 
00099