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