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 "vtkCommonDataModelModule.h" // For export macro
37 #include "vtkCell3D.h"
38 
39 class vtkLine;
40 class vtkPixel;
42 
44 {
45 public:
46  static vtkVoxel *New();
47  vtkTypeMacro(vtkVoxel,vtkCell3D);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
52  virtual void GetEdgePoints(int edgeId, int* &pts);
53  virtual void GetFacePoints(int faceId, int* &pts);
54  virtual double *GetParametricCoords();
56 
58 
59  int GetCellType() {return VTK_VOXEL;}
60  int GetCellDimension() {return 3;}
61  int GetNumberOfEdges() {return 12;}
62  int GetNumberOfFaces() {return 6;}
63  vtkCell *GetEdge(int edgeId);
64  vtkCell *GetFace(int faceId);
65  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
66  void Contour(double value, vtkDataArray *cellScalars,
68  vtkCellArray *lines, vtkCellArray *polys,
69  vtkPointData *inPd, vtkPointData *outPd,
70  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
71  int EvaluatePosition(double x[3], double* closestPoint,
72  int& subId, double pcoords[3],
73  double& dist2, double *weights);
74  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
75  double *weights);
76  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
77  double x[3], double pcoords[3], int& subId);
78  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
79  void Derivatives(int subId, double pcoords[3], double *values,
80  int dim, double *derivs);
82 
84  static void InterpolationDerivs(double pcoords[3], double derivs[24]);
86 
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:36
int GetNumberOfEdges()
Definition: vtkVoxel.h:61
static void InterpolationFunctions(double pcoords[3], double weights[8])
virtual double * GetParametricCoords()
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:39
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
int vtkIdType
Definition: vtkType.h:247
static void InterpolationDerivs(double pcoords[3], double derivs[24])
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
Definition: vtkVoxel.h:88
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:58
virtual void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:43
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
virtual void GetFacePoints(int faceId, int *&pts)=0
void PrintSelf(ostream &os, vtkIndent indent)
int GetCellDimension()
Definition: vtkVoxel.h:60
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
int GetCellType()
Definition: vtkVoxel.h:59
int GetNumberOfFaces()
Definition: vtkVoxel.h:62
virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
Definition: vtkVoxel.h:92
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual void GetEdgePoints(int edgeId, int *&pts)=0
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38