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

Common/vtkVoxel.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVoxel.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 =========================================================================*/
00046 #ifndef __vtkVoxel_h
00047 #define __vtkVoxel_h
00048 
00049 #include "vtkCell3D.h"
00050 
00051 class vtkLine;
00052 class vtkPixel;
00053 
00054 class VTK_COMMON_EXPORT vtkVoxel : public vtkCell3D
00055 {
00056 public:
00057   static vtkVoxel *New();
00058   vtkTypeRevisionMacro(vtkVoxel,vtkCell3D);
00059 
00061 
00062   virtual void GetEdgePoints(int edgeId, int* &pts);
00063   virtual void GetFacePoints(int faceId, int* &pts);
00064   virtual float *GetParametricCoords();
00066 
00068 
00069   int GetCellType() {return VTK_VOXEL;}
00070   int GetCellDimension() {return 3;}
00071   int GetNumberOfEdges() {return 12;}
00072   int GetNumberOfFaces() {return 6;}
00073   vtkCell *GetEdge(int edgeId);
00074   vtkCell *GetFace(int faceId);
00075   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00076   void Contour(float value, vtkDataArray *cellScalars, 
00077                vtkPointLocator *locator, vtkCellArray *verts, 
00078                vtkCellArray *lines, vtkCellArray *polys,
00079                vtkPointData *inPd, vtkPointData *outPd,
00080                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00081   int EvaluatePosition(float x[3], float* closestPoint,
00082                        int& subId, float pcoords[3],
00083                        float& dist2, float *weights);
00084   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00085                         float *weights);
00086   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00087                         float x[3], float pcoords[3], int& subId);
00088   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00089   void Derivatives(int subId, float pcoords[3], float *values, 
00090                    int dim, float *derivs);
00092 
00094 
00095   static void InterpolationFunctions(float pcoords[3], float weights[8]);
00096   static void InterpolationDerivs(float pcoords[3], float derivs[24]);
00097   static int *GetEdgeArray(int edgeId);
00098   static int *GetFaceArray(int faceId);
00100 
00101 protected:
00102   vtkVoxel();
00103   ~vtkVoxel();
00104 
00105   vtkLine *Line;
00106   vtkPixel *Pixel;
00107   
00108 private:
00109   vtkVoxel(const vtkVoxel&);  // Not implemented.
00110   void operator=(const vtkVoxel&);  // Not implemented.
00111 };
00112 
00113 #endif
00114 
00115