VTK
vtkGenericCell.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericCell.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 =========================================================================*/
35 #ifndef vtkGenericCell_h
36 #define vtkGenericCell_h
37 
38 #include "vtkCommonDataModelModule.h" // For export macro
39 #include "vtkCell.h"
40 
42 {
43 public:
45  static vtkGenericCell *New();
46 
47  vtkTypeMacro(vtkGenericCell,vtkCell);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
52  void SetPoints(vtkPoints *points);
53 
56  void SetPointIds(vtkIdList *pointIds);
57 
59 
60  void ShallowCopy(vtkCell *c);
61  void DeepCopy(vtkCell *c);
62  int GetCellType();
63  int GetCellDimension();
64  int IsLinear();
66  void Initialize();
68  void SetFaces(vtkIdType *faces);
70  int GetNumberOfEdges();
71  int GetNumberOfFaces();
72  vtkCell *GetEdge(int edgeId);
73  vtkCell *GetFace(int faceId);
74  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
75  int EvaluatePosition(double x[3], double* closestPoint,
76  int& subId, double pcoords[3],
77  double& dist2, double *weights);
78  void EvaluateLocation(int& subId, double pcoords[3],
79  double x[3], double *weights);
80  void Contour(double value, vtkDataArray *cellScalars,
82  vtkCellArray *lines, vtkCellArray *polys,
83  vtkPointData *inPd, vtkPointData *outPd,
84  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
85  void Clip(double value, vtkDataArray *cellScalars,
86  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
87  vtkPointData *inPd, vtkPointData *outPd,
88  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
89  int insideOut);
90  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
91  double x[3], double pcoords[3], int& subId);
92  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
93  void Derivatives(int subId, double pcoords[3], double *values,
94  int dim, double *derivs);
95  int GetParametricCenter(double pcoords[3]);
96  double *GetParametricCoords();
97  int IsPrimaryCell();
99 
101 
103  virtual void InterpolateFunctions(double pcoords[3], double *weights);
104  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
106 
108 
113  void SetCellType(int cellType);
114  void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
115  void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
116  void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
117  void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
118  void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
119  void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
120  void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
121  void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
122  void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
123  void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
124  void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
125  void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
126  void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
127  void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
128  void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
131  void SetCellTypeToPolyhedron() {this->SetCellType(VTK_POLYHEDRON);}
133  void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
134  void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
137  void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
147  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
149  this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
151  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
153 
155  static vtkCell* InstantiateCell(int cellType);
156 
157 protected:
158  vtkGenericCell();
159  ~vtkGenericCell();
160 
162 
163 private:
164  vtkGenericCell(const vtkGenericCell&); // Not implemented.
165  void operator=(const vtkGenericCell&); // Not implemented.
166 };
167 
168 #endif
169 
170 
virtual void DeepCopy(vtkCell *c)
void SetCellTypeToPyramid()
virtual int GetCellDimension()=0
void SetCellTypeToTriangle()
represent and manipulate point attribute data
Definition: vtkPointData.h:36
virtual int GetNumberOfFaces()=0
void SetCellTypeToPolyVertex()
void PrintSelf(ostream &os, vtkIndent indent)
void SetCellTypeToConvexPointSet()
virtual int GetCellType()=0
virtual void InterpolateFunctions(double vtkNotUsed(pcoords)[3], double *vtkNotUsed(weight))
Definition: vtkCell.h:306
virtual double * GetParametricCoords()
void SetCellTypeToPentagonalPrism()
void SetCellTypeToHexahedron()
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
void SetCellTypeToBiQuadraticQuadraticHexahedron()
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
void SetCellTypeToQuadraticPolygon()
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
void SetCellTypeToPolyhedron()
void SetCellTypeToPolygon()
int vtkIdType
Definition: vtkType.h:275
void SetCellTypeToQuadraticQuad()
void SetCellTypeToPolyLine()
provides thread-safe access to cells
virtual int IsLinear()
Definition: vtkCell.h:89
void SetCellTypeToPixel()
void SetCellTypeToTetra()
void SetCellTypeToWedge()
virtual void SetFaces(vtkIdType *vtkNotUsed(faces))
Definition: vtkCell.h:109
void SetCellTypeToQuadraticWedge()
abstract class to specify cell behavior
Definition: vtkCell.h:61
void SetCellTypeToTriQuadraticHexahedron()
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
void SetCellTypeToQuad()
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 int RequiresInitialization()
Definition: vtkCell.h:95
void SetCellTypeToVoxel()
void SetCellTypeToQuadraticLinearQuad()
void SetCellTypeToVertex()
void SetCellTypeToQuadraticPyramid()
void SetCellTypeToBiQuadraticQuadraticWedge()
virtual int RequiresExplicitFaceRepresentation()
Definition: vtkCell.h:108
void SetCellTypeToQuadraticEdge()
virtual void InterpolateDerivs(double vtkNotUsed(pcoords)[3], double *vtkNotUsed(derivs))
Definition: vtkCell.h:309
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
CellTypeInDataSet cellType(vtkDataSet *input)
virtual void ShallowCopy(vtkCell *c)
virtual vtkCell * GetFace(int faceId)=0
virtual int GetNumberOfEdges()=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
void SetCellTypeToBiQuadraticTriangle()
void SetCellTypeToQuadraticLinearWedge()
void SetCellTypeToLine()
void SetCellTypeToTriangleStrip()
void SetCellTypeToQuadraticTriangle()
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)=0
virtual int IsPrimaryCell()
Definition: vtkCell.h:290
void SetCellTypeToHexagonalPrism()
virtual vtkIdType * GetFaces()
Definition: vtkCell.h:110
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
virtual void Initialize()
Definition: vtkCell.h:96
static vtkObject * New()
void SetCellTypeToQuadraticTetra()
virtual int GetParametricCenter(double pcoords[3])
void SetCellTypeToCubicLine()
void SetCellTypeToBiQuadraticQuad()
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38
void SetCellTypeToEmptyCell()
void SetCellTypeToQuadraticHexahedron()