VTK
vtkVoxel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVoxel.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
33 #ifndef __vtkVoxel_h
34 #define __vtkVoxel_h
35 
36 #include "vtkCell3D.h"
37 
38 class vtkLine;
39 class vtkPixel;
40 class vtkIncrementalPointLocator;
41 
42 class VTK_FILTERING_EXPORT vtkVoxel : public vtkCell3D
43 {
44 public:
45  static vtkVoxel *New();
46  vtkTypeMacro(vtkVoxel,vtkCell3D);
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
51  virtual void GetEdgePoints(int edgeId, int* &pts);
52  virtual void GetFacePoints(int faceId, int* &pts);
53  virtual double *GetParametricCoords();
55 
57 
58  int GetCellType() {return VTK_VOXEL;}
59  int GetCellDimension() {return 3;}
60  int GetNumberOfEdges() {return 12;}
61  int GetNumberOfFaces() {return 6;}
62  vtkCell *GetEdge(int edgeId);
63  vtkCell *GetFace(int faceId);
64  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
65  void Contour(double value, vtkDataArray *cellScalars,
66  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
67  vtkCellArray *lines, vtkCellArray *polys,
68  vtkPointData *inPd, vtkPointData *outPd,
69  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
70  int EvaluatePosition(double x[3], double* closestPoint,
71  int& subId, double pcoords[3],
72  double& dist2, double *weights);
73  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
74  double *weights);
75  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
76  double x[3], double pcoords[3], int& subId);
77  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
78  void Derivatives(int subId, double pcoords[3], double *values,
79  int dim, double *derivs);
81 
83 
84  static void InterpolationDerivs(double pcoords[3], double derivs[24]);
85  // Description:
86  // Compute the interpolation functions/derivatives
87  // (aka shape functions/derivatives)
88  virtual void InterpolateFunctions(double pcoords[3], double weights[8])
89  {
90  vtkVoxel::InterpolationFunctions(pcoords,weights);
91  }
92  virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
93  {
94  vtkVoxel::InterpolationDerivs(pcoords,derivs);
95  }
97 
101  static void InterpolationFunctions(double pcoords[3], double weights[8]);
102 
104 
106  static int *GetEdgeArray(int edgeId);
107  static int *GetFaceArray(int faceId);
109 
110 protected:
111  vtkVoxel();
112  ~vtkVoxel();
113 
114 private:
115  vtkVoxel(const vtkVoxel&); // Not implemented.
116  void operator=(const vtkVoxel&); // Not implemented.
117 
118  vtkLine *Line;
119  vtkPixel *Pixel;
120 };
121 
122 #endif
123 
124 
represent and manipulate point attribute data
Definition: vtkPointData.h:35
int GetNumberOfEdges()
Definition: vtkVoxel.h:60
static void InterpolationFunctions(double pcoords[3], double weights[8])
#define VTK_FILTERING_EXPORT
int vtkIdType
Definition: vtkType.h:255
static void InterpolationDerivs(double pcoords[3], double derivs[24])
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
Definition: vtkVoxel.h:88
cell represents a 1D line
Definition: vtkLine.h:33
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:42
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
int GetCellDimension()
Definition: vtkVoxel.h:59
object to represent cell connectivity
Definition: vtkCellArray.h:48
int GetCellType()
Definition: vtkVoxel.h:58
int GetNumberOfFaces()
Definition: vtkVoxel.h:61
virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
Definition: vtkVoxel.h:92
represent and manipulate 3D points
Definition: vtkPoints.h:38