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 =========================================================================*/
30 #ifndef vtkGenericCell_h
31 #define vtkGenericCell_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkCell.h"
35 
36 class VTKCOMMONDATAMODEL_EXPORT vtkGenericCell : public vtkCell
37 {
38 public:
42  static vtkGenericCell *New();
43 
44  vtkTypeMacro(vtkGenericCell,vtkCell);
45  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
46 
51  void SetPoints(vtkPoints *points);
52 
57  void SetPointIds(vtkIdList *pointIds);
58 
60 
63  void ShallowCopy(vtkCell *c) VTK_OVERRIDE;
64  void DeepCopy(vtkCell *c) VTK_OVERRIDE;
65  int GetCellType() VTK_OVERRIDE;
66  int GetCellDimension() VTK_OVERRIDE;
67  int IsLinear() VTK_OVERRIDE;
68  int RequiresInitialization() VTK_OVERRIDE;
69  void Initialize() VTK_OVERRIDE;
70  int RequiresExplicitFaceRepresentation() VTK_OVERRIDE;
71  void SetFaces(vtkIdType *faces) VTK_OVERRIDE;
72  vtkIdType *GetFaces() VTK_OVERRIDE;
73  int GetNumberOfEdges() VTK_OVERRIDE;
74  int GetNumberOfFaces() VTK_OVERRIDE;
75  vtkCell *GetEdge(int edgeId) VTK_OVERRIDE;
76  vtkCell *GetFace(int faceId) VTK_OVERRIDE;
77  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts) VTK_OVERRIDE;
78  int EvaluatePosition(double x[3], double* closestPoint,
79  int& subId, double pcoords[3],
80  double& dist2, double *weights) VTK_OVERRIDE;
81  void EvaluateLocation(int& subId, double pcoords[3],
82  double x[3], double *weights) VTK_OVERRIDE;
83  void Contour(double value, vtkDataArray *cellScalars,
85  vtkCellArray *lines, vtkCellArray *polys,
86  vtkPointData *inPd, vtkPointData *outPd,
87  vtkCellData *inCd, vtkIdType cellId,
88  vtkCellData *outCd) VTK_OVERRIDE;
89  void Clip(double value, vtkDataArray *cellScalars,
90  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
91  vtkPointData *inPd, vtkPointData *outPd,
92  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
93  int insideOut) VTK_OVERRIDE;
94  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
95  double x[3], double pcoords[3],
96  int& subId) VTK_OVERRIDE;
97  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) VTK_OVERRIDE;
98  void Derivatives(int subId, double pcoords[3], double *values,
99  int dim, double *derivs) VTK_OVERRIDE;
100  int GetParametricCenter(double pcoords[3]) VTK_OVERRIDE;
101  double *GetParametricCoords() VTK_OVERRIDE;
102  int IsPrimaryCell() VTK_OVERRIDE;
104 
106 
110  void InterpolateFunctions(double pcoords[3], double *weights) VTK_OVERRIDE;
111  void InterpolateDerivs(double pcoords[3], double *derivs) VTK_OVERRIDE;
113 
121  void SetCellType(int cellType);
122  void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
123  void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
124  void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
125  void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
126  void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
127  void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
128  void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
129  void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
130  void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
131  void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
132  void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
133  void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
134  void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
135  void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
136  void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
139  void SetCellTypeToPolyhedron() {this->SetCellType(VTK_POLYHEDRON);}
141  void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
142  void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
145  void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
155  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
157  this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
159  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
160 
164  static vtkCell* InstantiateCell(int cellType);
165 
166  vtkCell* GetRepresentativeCell() { return this->Cell; }
167 
168 protected:
169  vtkGenericCell();
170  ~vtkGenericCell() VTK_OVERRIDE;
171 
173 
174 private:
175  vtkGenericCell(const vtkGenericCell&) VTK_DELETE_FUNCTION;
176  void operator=(const vtkGenericCell&) VTK_DELETE_FUNCTION;
177 };
178 
179 #endif
virtual void DeepCopy(vtkCell *c)
Copy this cell by completely copying internal data structures.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCellTypeToPyramid()
void SetCellTypeToTriangle()
represent and manipulate point attribute data
Definition: vtkPointData.h:31
void SetCellTypeToPolyVertex()
void SetCellTypeToConvexPointSet()
virtual int GetCellType()=0
Return the type of cell.
void SetCellTypeToPentagonalPrism()
void SetCellTypeToHexahedron()
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
void SetCellTypeToBiQuadraticQuadraticHexahedron()
Abstract class in support of both point location and point insertion.
void SetCellTypeToQuadraticPolygon()
void SetCellTypeToPolyhedron()
void SetCellTypeToPolygon()
int vtkIdType
Definition: vtkType.h:345
void SetCellTypeToQuadraticQuad()
void SetCellTypeToPolyLine()
provides thread-safe access to cells
void SetCellTypeToPixel()
void SetCellTypeToTetra()
void SetCellTypeToWedge()
void SetCellTypeToQuadraticWedge()
abstract class to specify cell behavior
Definition: vtkCell.h:56
void SetCellTypeToTriQuadraticHexahedron()
a simple class to control print indentation
Definition: vtkIndent.h:33
list of point or cell ids
Definition: vtkIdList.h:30
void SetCellTypeToQuad()
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
void SetCellTypeToVoxel()
void SetCellTypeToQuadraticLinearQuad()
void SetCellTypeToVertex()
void SetCellTypeToQuadraticPyramid()
void SetCellTypeToBiQuadraticQuadraticWedge()
void SetCellTypeToQuadraticEdge()
vtkCell * GetRepresentativeCell()
virtual void ShallowCopy(vtkCell *c)
Copy this cell by reference counting the internal data structures.
object to represent cell connectivity
Definition: vtkCellArray.h:44
void SetCellTypeToBiQuadraticTriangle()
void SetCellTypeToQuadraticLinearWedge()
void SetCellTypeToLine()
void SetCellTypeToTriangleStrip()
void SetCellTypeToQuadraticTriangle()
void SetCellTypeToHexagonalPrism()
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetCellTypeToQuadraticTetra()
void SetCellTypeToCubicLine()
void SetCellTypeToBiQuadraticQuad()
represent and manipulate 3D points
Definition: vtkPoints.h:33
void SetCellTypeToQuadraticHexahedron()