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();
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  {
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:
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 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
VTK_VOXEL
@ VTK_VOXEL
Definition: vtkCellType.h:55
vtkVoxel::GetEdgePoints
virtual void GetEdgePoints(int edgeId, int *&pts)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkVoxel::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkVoxel.h:61
vtkVoxel::GetEdge
vtkCell * GetEdge(int edgeId)
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkVoxel::GetFace
vtkCell * GetFace(int faceId)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkVoxel::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkCommonDataModelModule.h
vtkVoxel::GetFacePoints
virtual void GetFacePoints(int faceId, int *&pts)
vtkVoxel::GetFaceArray
static int * GetFaceArray(int faceId)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkVoxel::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[24])
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkVoxel::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkVoxel.h:62
vtkVoxel::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkVoxel::GetCellDimension
int GetCellDimension()
Definition: vtkVoxel.h:60
vtkCell3D.h
vtkVoxel::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkVoxel::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkVoxel::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkVoxel::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkVoxel::vtkVoxel
vtkVoxel()
vtkVoxel::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[8])
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkVoxel::New
static vtkVoxel * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkVoxel::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkVoxel::~vtkVoxel
~vtkVoxel()
vtkVoxel::GetParametricCoords
virtual double * GetParametricCoords()
vtkVoxel::GetCellType
int GetCellType()
Definition: vtkVoxel.h:59
vtkVoxel::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkPixel
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:40
vtkVoxel::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
Definition: vtkVoxel.h:92
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkVoxel::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
Definition: vtkVoxel.h:88
vtkVoxel::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkVoxel
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:44