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

vtkVoxel.h

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