VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
32 #ifndef __vtkGenericCell_h
33 #define __vtkGenericCell_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkCell.h"
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkGenericCell : public vtkCell
39 {
40 public:
42  static vtkGenericCell *New();
43 
44  vtkTypeMacro(vtkGenericCell,vtkCell);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  void ShallowCopy(vtkCell *c);
50  void DeepCopy(vtkCell *c);
51  int GetCellType();
52  int GetCellDimension();
53  int IsLinear();
54  int RequiresInitialization();
55  void Initialize();
56  int RequiresExplicitFaceRepresentation();
57  void SetFaces(vtkIdType *faces);
58  vtkIdType *GetFaces();
59  int GetNumberOfEdges();
60  int GetNumberOfFaces();
61  vtkCell *GetEdge(int edgeId);
62  vtkCell *GetFace(int faceId);
63  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
64  int EvaluatePosition(double x[3], double* closestPoint,
65  int& subId, double pcoords[3],
66  double& dist2, double *weights);
67  void EvaluateLocation(int& subId, double pcoords[3],
68  double x[3], double *weights);
69  void Contour(double value, vtkDataArray *cellScalars,
70  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
71  vtkCellArray *lines, vtkCellArray *polys,
72  vtkPointData *inPd, vtkPointData *outPd,
73  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
74  void Clip(double value, vtkDataArray *cellScalars,
75  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
76  vtkPointData *inPd, vtkPointData *outPd,
77  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
78  int insideOut);
79  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
80  double x[3], double pcoords[3], int& subId);
81  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
82  void Derivatives(int subId, double pcoords[3], double *values,
83  int dim, double *derivs);
84  int GetParametricCenter(double pcoords[3]);
85  double *GetParametricCoords();
86  int IsPrimaryCell();
88 
90 
92  virtual void InterpolateFunctions(double pcoords[3], double *weights);
93  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
95 
97 
102  void SetCellType(int cellType);
103  void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
104  void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
105  void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
106  void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
107  void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
108  void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
109  void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
110  void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
111  void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
112  void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
113  void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
114  void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
115  void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
116  void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
117  void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
118  void SetCellTypeToPentagonalPrism() {this->SetCellType(VTK_PENTAGONAL_PRISM);}
119  void SetCellTypeToHexagonalPrism() {this->SetCellType(VTK_HEXAGONAL_PRISM);}
120  void SetCellTypeToPolyhedron() {this->SetCellType(VTK_POLYHEDRON);}
121  void SetCellTypeToConvexPointSet() {this->SetCellType(VTK_CONVEX_POINT_SET);}
122  void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
123  void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
124  void SetCellTypeToQuadraticTriangle() {this->SetCellType(VTK_QUADRATIC_TRIANGLE);}
125  void SetCellTypeToBiQuadraticTriangle() {this->SetCellType(VTK_BIQUADRATIC_TRIANGLE);}
126  void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
127  void SetCellTypeToQuadraticTetra() {this->SetCellType(VTK_QUADRATIC_TETRA);}
128  void SetCellTypeToQuadraticHexahedron() {this->SetCellType(VTK_QUADRATIC_HEXAHEDRON);}
129  void SetCellTypeToQuadraticWedge() {this->SetCellType(VTK_QUADRATIC_WEDGE);}
130  void SetCellTypeToQuadraticPyramid() {this->SetCellType(VTK_QUADRATIC_PYRAMID);}
131  void SetCellTypeToQuadraticLinearQuad() {this->SetCellType(VTK_QUADRATIC_LINEAR_QUAD);}
132  void SetCellTypeToBiQuadraticQuad() {this->SetCellType(VTK_BIQUADRATIC_QUAD);}
133  void SetCellTypeToQuadraticLinearWedge() {this->SetCellType(VTK_QUADRATIC_LINEAR_WEDGE);}
135  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
137  this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
139  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
141 
143  static vtkCell* InstantiateCell(int cellType);
144 
145 protected:
146  vtkGenericCell();
147  ~vtkGenericCell();
148 
149  vtkCell *Cell;
150 
151 private:
152  vtkGenericCell(const vtkGenericCell&); // Not implemented.
153  void operator=(const vtkGenericCell&); // Not implemented.
154 };
155 
156 #endif
157 
158 
void SetCellTypeToPyramid()
void SetCellTypeToTriangle()
void SetCellTypeToPolyVertex()
void SetCellTypeToConvexPointSet()
void SetCellTypeToPentagonalPrism()
void SetCellTypeToHexahedron()
void SetCellTypeToBiQuadraticQuadraticHexahedron()
Abstract class in support of both point location and point insertion.
void SetCellTypeToPolyhedron()
void SetCellTypeToPolygon()
int vtkIdType
Definition: vtkType.h:268
void SetCellTypeToQuadraticQuad()
void SetCellTypeToPolyLine()
provides thread-safe access to cells
void SetCellTypeToPixel()
void SetCellTypeToTetra()
void SetCellTypeToWedge()
void SetCellTypeToQuadraticWedge()
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()
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void SetCellTypeToVoxel()
void SetCellTypeToQuadraticLinearQuad()
void SetCellTypeToVertex()
void SetCellTypeToQuadraticPyramid()
void SetCellTypeToBiQuadraticQuadraticWedge()
void SetCellTypeToQuadraticEdge()
void SetCellTypeToBiQuadraticTriangle()
void SetCellTypeToQuadraticLinearWedge()
void SetCellTypeToLine()
void SetCellTypeToTriangleStrip()
void SetCellTypeToQuadraticTriangle()
void SetCellTypeToHexagonalPrism()
void SetCellTypeToQuadraticTetra()
void SetCellTypeToCubicLine()
void SetCellTypeToBiQuadraticQuad()
represent and manipulate 3D points
Definition: vtkPoints.h:39
void SetCellTypeToEmptyCell()
void SetCellTypeToQuadraticHexahedron()