48#ifndef vtkCellTypeTraits_h
49#define vtkCellTypeTraits_h
51#include "vtkABINamespace.h"
57VTK_ABI_NAMESPACE_BEGIN
116template <
int CellType>
119#define vtkCellTypeTraitsMacro(type, cellClass, className, name, dimension, isLinear, points, \
120 corners, edges, faces, minEdgeSize, maxEdgeSize, minFaceSize, maxFaceSize, maxFaceCorners, \
121 minFaceCorners, maxValence) \
123 struct vtkCellTypeTraits<type> \
125 static constexpr int CellType = type; \
126 using CellClass = cellClass; \
127 static constexpr const char* ClassName = className; \
128 static constexpr const char* Name = name; \
129 static constexpr int Dimension = dimension; \
130 static constexpr bool IsLinear = isLinear; \
131 static constexpr bool HasFixedSize = (points) >= 0; \
132 static constexpr int NumberOfPoints = points; \
133 static constexpr int NumberOfCorners = corners; \
134 static constexpr int NumberOfEdges = edges; \
135 static constexpr int NumberOfFaces = faces; \
136 static constexpr int MinimumEdgeSize = minEdgeSize; \
137 static constexpr int MaximumEdgeSize = maxEdgeSize; \
138 static constexpr int MinimumFaceSize = minFaceSize; \
139 static constexpr int MaximumFaceSize = maxFaceSize; \
140 static constexpr int MaximumFaceCorners = maxFaceCorners; \
141 static constexpr int MinimumFaceCorners = minFaceCorners; \
142 static constexpr int MaximumValence = maxValence; \
147#define vtkFixedCellTypeTraitsMacro(type, cellClass, name, dimension, isLinear, points, corners, \
148 edges, faces, minEdgeSize, maxEdgeSize, minFaceSize, maxFaceSize, maxFaceCorners, \
149 minFaceCorners, maxValence) \
150 vtkCellTypeTraitsMacro(type, cellClass, #cellClass, name, dimension, isLinear, points, corners, \
151 edges, faces, minEdgeSize, maxEdgeSize, minFaceSize, maxFaceSize, maxFaceCorners, \
152 minFaceCorners, maxValence)
153#define vtkVariableCellTypeTraitsMacro(type, cellClass, name, dimension, isLinear) \
154 vtkCellTypeTraitsMacro(type, cellClass, #cellClass, name, dimension, isLinear, -1, -1, -1, -1, \
155 -1, -1, -1, -1, -1, -1, -1)
156#define vtkHigherOrderCellTypeTraitsMacro(type, cellClass, name, dimension, corners, edges, faces, \
157 maxFaceCorners, minFaceCorners, maxValence) \
158 vtkCellTypeTraitsMacro(type, cellClass, #cellClass, name, dimension, false, -1, corners, edges, \
159 faces, -1, -1, -1, -1, maxFaceCorners, minFaceCorners, maxValence)
167 VTK_EMPTY_CELL,
vtkEmptyCell,
"Empty Cell", 0,
true, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
169 VTK_VERTEX,
vtkVertex,
"Vertex", 0,
true, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
171vtkFixedCellTypeTraitsMacro(
VTK_LINE,
vtkLine,
"Line", 1,
true, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0);
174 VTK_TRIANGLE,
vtkTriangle,
"Triangle", 2,
true, 3, 3, 3, 0, 2, 2, 0, 0, 0, 0, 2);
177vtkFixedCellTypeTraitsMacro(
VTK_PIXEL,
vtkPixel,
"Pixel", 2,
true, 4, 4, 4, 0, 2, 2, 0, 0, 0, 0, 2);
179 VTK_QUAD,
vtkQuad,
"Quadrilateral", 2,
true, 4, 4, 4, 0, 2, 2, 0, 0, 0, 0, 2);
181 VTK_TETRA,
vtkTetra,
"Tetrahedron", 3,
true, 4, 4, 6, 4, 2, 2, 3, 3, 3, 3, 3);
183 VTK_VOXEL,
vtkVoxel,
"Voxel", 3,
true, 8, 8, 12, 6, 2, 2, 4, 4, 4, 4, 3);
185 VTK_HEXAHEDRON,
vtkHexahedron,
"Hexahedron", 3,
true, 8, 8, 12, 6, 2, 2, 4, 4, 4, 4, 3);
186vtkFixedCellTypeTraitsMacro(
VTK_WEDGE,
vtkWedge,
"Wedge", 3,
true, 6, 6, 9, 5, 2, 2, 3, 4, 4, 3, 3);
188 VTK_PYRAMID,
vtkPyramid,
"Pyramid", 3,
true, 5, 5, 8, 5, 2, 2, 3, 4, 4, 3, 4);
190 10, 10, 15, 7, 2, 2, 4, 5, 5, 4, 3);
192 12, 18, 8, 2, 2, 4, 6, 6, 4, 3);
195 0, 0, 0, 0, 0, 0, 0, 0, 0);
197 false, 6, 3, 3, 0, 3, 3, 0, 0, 0, 0, 2);
199 false, 8, 4, 4, 0, 3, 3, 0, 0, 0, 0, 2);
203 false, 10, 4, 6, 4, 3, 3, 6, 6, 3, 3, 3);
205 "Quadratic Hexahedron", 3,
false, 20, 8, 12, 6, 3, 3, 8, 8, 4, 4, 3);
207 6, 9, 5, 3, 3, 6, 8, 4, 3, 3);
209 false, 13, 5, 8, 5, 3, 3, 6, 8, 4, 3, 4);
211 2,
false, 9, 4, 4, 0, 3, 3, 0, 0, 0, 0, 2);
213 "Tri-Quadratic Hexahedron", 3,
false, 27, 8, 12, 6, 3, 3, 9, 9, 4, 4, 3);
215 "Tri-Quadratic Pyramid", 3,
false, 19, 5, 8, 5, 3, 3, 7, 9, 4, 3, 4);
217 "Quadratic Linear Quadrilateral", 2,
false, 6, 4, 4, 0, 2, 3, 0, 0, 0, 0, 2);
219 "Quadratic Linear Wedge", 3,
false, 12, 6, 9, 5, 2, 3, 6, 6, 4, 3, 3);
221 "Bi-Quadratic Quadratic Wedge", 3,
false, 18, 6, 9, 5, 3, 3, 6, 9, 4, 3, 3);
223 "Bi-Quadratic Quadratic Hexahedron", 3,
false, 24, 8, 12, 6, 3, 3, 8, 9, 4, 4, 3);
225 "Bi-Quadratic Triangle", 2,
false, 7, 3, 3, 0, 3, 3, 0, 0, 0, 0, 2);
228 VTK_CUBIC_LINE,
vtkCubicLine,
"Cubic Line", 1,
false, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0);
231 "Convex Pointset", 3,
true, -1, -1, 0, -1, -1, -1, -1, -1, 3, 3, 0);
240 "Higher Order Quadrilateral", 2, 4, 4, 0, 0, 0, 2);
242 "Higher Order Tetrahedron", 3, 4, 6, 4, 3, 3, 3);
246 VTK_HIGHER_ORDER_PYRAMID,
void,
nullptr,
nullptr, 3,
false, -1, 5, 8, 5, -1, -1, -1, -1, 4, 3, 4);
248 "Higher Order Hexahedron", 3, 8, 12, 6, 4, 4, 3);
255 "Lagrange Quadrilateral", 2, 4, 4, 0, 0, 0, 2);
263 VTK_LAGRANGE_PYRAMID,
void,
nullptr,
nullptr, 3,
false, -1, 5, 8, 5, -1, -1, -1, -1, 4, 3, 4);
278 VTK_BEZIER_PYRAMID,
void,
nullptr,
nullptr, 3,
false, -1, 5, 8, 5, -1, -1, -1, -1, 4, 3, 4);
280#undef vtkHigherOrderCellTypeTraitsMacro
281#undef vtkVariableCellTypeTraitsMacro
282#undef vtkFixedCellTypeTraitsMacro
283#undef vtkCellTypeTraitsMacro
333template <
class Functor>
346#define vtkCellTypeTraitsMembersMacro(cellType) \
347 using Traits = vtkCellTypeTraits<cellType>; \
348 static constexpr int CellType = Traits::CellType; \
349 static constexpr int Dimension = Traits::Dimension; \
350 static constexpr bool IsLinearCell = Traits::IsLinear; \
351 static constexpr bool HasFixedSize = Traits::HasFixedSize; \
352 static constexpr vtkIdType NumberOfPoints = Traits::NumberOfPoints; \
353 static constexpr vtkIdType NumberOfCorners = Traits::NumberOfCorners; \
354 static constexpr vtkIdType NumberOfEdges = Traits::NumberOfEdges; \
355 static constexpr vtkIdType NumberOfFaces = Traits::NumberOfFaces; \
356 static constexpr vtkIdType MinimumEdgeSize = Traits::MinimumEdgeSize; \
357 static constexpr vtkIdType MaximumEdgeSize = Traits::MaximumEdgeSize; \
358 static constexpr vtkIdType MinimumFaceSize = Traits::MinimumFaceSize; \
359 static constexpr vtkIdType MaximumFaceSize = Traits::MaximumFaceSize; \
360 static constexpr vtkIdType MaximumFaceCorners = Traits::MaximumFaceCorners; \
361 static constexpr vtkIdType MinimumFaceCorners = Traits::MinimumFaceCorners; \
362 static constexpr vtkIdType MaximumValence = Traits::MaximumValence
A 3D cell that represents an arbitrary order Bezier hex.
A 3D cell that represents an arbitrary order Bezier tetrahedron.
A 2D cell that represents an arbitrary order Bezier triangle.
A 3D cell that represents an arbitrary order Bezier wedge.
cell represents a parabolic, 9-node isoparametric quad
cell represents a biquadratic, 24-node isoparametric hexahedron
cell represents a parabolic, 18-node isoparametric wedge
cell represents a parabolic, isoparametric triangle
a 3D cell defined by a set of convex points
cell represents a cubic , isoparametric 1D line
an empty cell used as a place-holder during processing
a 3D cell that represents a prism with hexagonal base
a cell that represents a linear 3D hexahedron
A 3D cell that represents an arbitrary order HigherOrder hex.
A 3D cell that represents an arbitrary order HigherOrder tetrahedron.
A 2D cell that represents an arbitrary order HigherOrder triangle.
A 3D cell that represents an arbitrary order HigherOrder wedge.
A 3D cell that represents an arbitrary order Lagrange hex.
A 3D cell that represents an arbitrary order Lagrange tetrahedron.
A 2D cell that represents an arbitrary order Lagrange triangle.
A 3D cell that represents an arbitrary order Lagrange wedge.
cell represents a 1D line
a 3D cell that represents a convex prism with pentagonal base
a cell that represents an orthogonal quadrilateral
cell represents a set of 1D lines
cell represents a set of 0D vertices
a cell that represents an n-sided polygon
A 3D cell defined by a set of polygonal faces.
a 3D cell that represents a linear pyramid
a cell that represents a 2D quadrilateral
cell represents a parabolic, isoparametric edge
cell represents a parabolic, 20-node isoparametric hexahedron
cell represents a quadratic-linear, 6-node isoparametric quad
cell represents a, 12-node isoparametric wedge
a cell that represents a parabolic n-sided polygon
cell represents a parabolic, 13-node isoparametric pyramid
cell represents a parabolic, 8-node isoparametric quad
cell represents a parabolic, 10-node isoparametric tetrahedron
cell represents a parabolic, isoparametric triangle
cell represents a parabolic, 15-node isoparametric wedge
a 3D cell that represents a tetrahedron
cell represents a parabolic, 27-node isoparametric hexahedron
cell represents a parabolic, 19-node isoparametric pyramid
a cell that represents a triangle strip
a cell that represents a triangle
a cell that represents a 3D point
a cell that represents a 3D orthogonal parallelepiped
a 3D cell that represents a linear wedge
vtkTypeList::Create< vtkCellTypeTraits< VTK_EMPTY_CELL >, vtkCellTypeTraits< VTK_VERTEX >, vtkCellTypeTraits< VTK_POLY_VERTEX >, vtkCellTypeTraits< VTK_LINE >, vtkCellTypeTraits< VTK_POLY_LINE >, vtkCellTypeTraits< VTK_TRIANGLE >, vtkCellTypeTraits< VTK_TRIANGLE_STRIP >, vtkCellTypeTraits< VTK_POLYGON >, vtkCellTypeTraits< VTK_PIXEL >, vtkCellTypeTraits< VTK_QUAD >, vtkCellTypeTraits< VTK_TETRA >, vtkCellTypeTraits< VTK_VOXEL >, vtkCellTypeTraits< VTK_HEXAHEDRON >, vtkCellTypeTraits< VTK_WEDGE >, vtkCellTypeTraits< VTK_PYRAMID >, vtkCellTypeTraits< VTK_PENTAGONAL_PRISM >, vtkCellTypeTraits< VTK_HEXAGONAL_PRISM >, vtkCellTypeTraits< VTK_QUADRATIC_EDGE >, vtkCellTypeTraits< VTK_QUADRATIC_TRIANGLE >, vtkCellTypeTraits< VTK_QUADRATIC_QUAD >, vtkCellTypeTraits< VTK_QUADRATIC_POLYGON >, vtkCellTypeTraits< VTK_QUADRATIC_TETRA >, vtkCellTypeTraits< VTK_QUADRATIC_HEXAHEDRON >, vtkCellTypeTraits< VTK_QUADRATIC_WEDGE >, vtkCellTypeTraits< VTK_QUADRATIC_PYRAMID >, vtkCellTypeTraits< VTK_BIQUADRATIC_QUAD >, vtkCellTypeTraits< VTK_TRIQUADRATIC_HEXAHEDRON >, vtkCellTypeTraits< VTK_TRIQUADRATIC_PYRAMID >, vtkCellTypeTraits< VTK_QUADRATIC_LINEAR_QUAD >, vtkCellTypeTraits< VTK_QUADRATIC_LINEAR_WEDGE >, vtkCellTypeTraits< VTK_BIQUADRATIC_QUADRATIC_WEDGE >, vtkCellTypeTraits< VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON >, vtkCellTypeTraits< VTK_BIQUADRATIC_TRIANGLE >, vtkCellTypeTraits< VTK_CUBIC_LINE >, vtkCellTypeTraits< VTK_CONVEX_POINT_SET >, vtkCellTypeTraits< VTK_POLYHEDRON >, vtkCellTypeTraits< VTK_HIGHER_ORDER_CURVE >, vtkCellTypeTraits< VTK_HIGHER_ORDER_TRIANGLE >, vtkCellTypeTraits< VTK_HIGHER_ORDER_QUADRILATERAL >, vtkCellTypeTraits< VTK_HIGHER_ORDER_TETRAHEDRON >, vtkCellTypeTraits< VTK_HIGHER_ORDER_WEDGE >, vtkCellTypeTraits< VTK_HIGHER_ORDER_PYRAMID >, vtkCellTypeTraits< VTK_HIGHER_ORDER_HEXAHEDRON >, vtkCellTypeTraits< VTK_LAGRANGE_CURVE >, vtkCellTypeTraits< VTK_LAGRANGE_TRIANGLE >, vtkCellTypeTraits< VTK_LAGRANGE_QUADRILATERAL >, vtkCellTypeTraits< VTK_LAGRANGE_TETRAHEDRON >, vtkCellTypeTraits< VTK_LAGRANGE_HEXAHEDRON >, vtkCellTypeTraits< VTK_LAGRANGE_WEDGE >, vtkCellTypeTraits< VTK_LAGRANGE_PYRAMID >, vtkCellTypeTraits< VTK_BEZIER_CURVE >, vtkCellTypeTraits< VTK_BEZIER_TRIANGLE >, vtkCellTypeTraits< VTK_BEZIER_QUADRILATERAL >, vtkCellTypeTraits< VTK_BEZIER_TETRAHEDRON >, vtkCellTypeTraits< VTK_BEZIER_HEXAHEDRON >, vtkCellTypeTraits< VTK_BEZIER_WEDGE >, vtkCellTypeTraits< VTK_BEZIER_PYRAMID > > AllCellTypeTraits
constexpr void ForEach(Functor &&functor)
Call functor(T{}) for every type T of the TypeList TList, in order.
The traits of the cell type CellType, see the file description.
constexpr void vtkForEachCellType(Functor &&functor)
Call functor(vtkCellTypeTraits<CellType>{}) for every cell type with traits, in the order of vtkCellT...
#define vtkCellTypeTraitsMacro(type, cellClass, className, name, dimension, isLinear, points, corners, edges, faces, minEdgeSize, maxEdgeSize, minFaceSize, maxFaceSize, maxFaceCorners, minFaceCorners, maxValence)
#define vtkVariableCellTypeTraitsMacro(type, cellClass, name, dimension, isLinear)
#define vtkHigherOrderCellTypeTraitsMacro(type, cellClass, name, dimension, corners, edges, faces, maxFaceCorners, minFaceCorners, maxValence)
#define vtkFixedCellTypeTraitsMacro(type, cellClass, name, dimension, isLinear, points, corners, edges, faces, minEdgeSize, maxEdgeSize, minFaceSize, maxFaceSize, maxFaceCorners, minFaceCorners, maxValence)
@ VTK_QUADRATIC_HEXAHEDRON
@ VTK_HIGHER_ORDER_TETRAHEDRON
@ VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON
@ VTK_LAGRANGE_QUADRILATERAL
@ VTK_TRIQUADRATIC_PYRAMID
@ VTK_TRIQUADRATIC_HEXAHEDRON
@ VTK_LAGRANGE_HEXAHEDRON
@ VTK_HIGHER_ORDER_TRIANGLE
@ VTK_LAGRANGE_TETRAHEDRON
@ VTK_HIGHER_ORDER_PYRAMID
@ VTK_BEZIER_QUADRILATERAL
@ VTK_QUADRATIC_LINEAR_WEDGE
@ VTK_HIGHER_ORDER_HEXAHEDRON
@ VTK_HIGHER_ORDER_QUADRILATERAL
@ VTK_QUADRATIC_LINEAR_QUAD
@ VTK_BIQUADRATIC_QUADRATIC_WEDGE
@ VTK_BIQUADRATIC_TRIANGLE