VTK  9.6.20260402
vtkMarchingCellsContourCases Class Reference

Lookup tables for marching cells contouring. More...

#include <vtkMarchingCellsContourCases.h>

Public Types

using CellCase = const int*
 Generic interface to retrieve a contour case entry for any supported cell type.
 
using Edge = int[2]
 Returns the edge definitions for the given cell type as an array of (point index pairs), where each pair defines one edge of the cell.
 
using EdgeArray = const Edge*
 

Static Public Member Functions

static CellCase GetCellCase (int cellType, uint8_t caseIndex)
 
static EdgeArray GetCellEdges (int cellType)
 
using LineCase = int[2]
 Case tables for a line cell (VTK_LINE).
 
static const LineCaseGetLineCases ()
 Case tables for a line cell (VTK_LINE).
 
static const LineCaseGetLineCase (uint8_t caseIndex)
 Case tables for a line cell (VTK_LINE).
 
using TriangleCase = int[3]
 Case tables for a triangle cell (VTK_TRIANGLE).
 
static const TriangleCaseGetTriangleCases ()
 Case tables for a triangle cell (VTK_TRIANGLE).
 
static const TriangleCaseGetTriangleCase (uint8_t caseIndex)
 Case tables for a triangle cell (VTK_TRIANGLE).
 
using PixelCase = int[5]
 Case tables for a pixel cell (VTK_PIXEL).
 
static const PixelCaseGetPixelCases ()
 Case tables for a pixel cell (VTK_PIXEL).
 
static const PixelCaseGetPixelCase (uint8_t caseIndex)
 Case tables for a pixel cell (VTK_PIXEL).
 
using QuadCase = int[5]
 Case tables for a quad cell (VTK_QUAD).
 
static const QuadCaseGetQuadCases ()
 Case tables for a quad cell (VTK_QUAD).
 
static const QuadCaseGetQuadCase (uint8_t caseIndex)
 Case tables for a quad cell (VTK_QUAD).
 
using TetraCase = int[7]
 Case tables for a tetrahedron cell (VTK_TETRA).
 
static const TetraCaseGetTetraCases ()
 Case tables for a tetrahedron cell (VTK_TETRA).
 
static const TetraCaseGetTetraCase (uint8_t caseIndex)
 Case tables for a tetrahedron cell (VTK_TETRA).
 
using VoxelCase = int[16]
 Case tables for a voxel cell (VTK_VOXEL).
 
static const VoxelCaseGetVoxelCases ()
 Case tables for a voxel cell (VTK_VOXEL).
 
static const VoxelCaseGetVoxelCase (uint8_t caseIndex)
 Case tables for a voxel cell (VTK_VOXEL).
 
using HexahedronCase = int[16]
 Case tables for a hexahedron cell (VTK_HEXAHEDRON).
 
static const HexahedronCaseGetHexahedronCases ()
 Case tables for a hexahedron cell (VTK_HEXAHEDRON).
 
static const HexahedronCaseGetHexahedronCase (uint8_t caseIndex)
 Case tables for a hexahedron cell (VTK_HEXAHEDRON).
 
using HexahedronWithPolygonCase = int[17]
 Case tables for a hexahedron cell with polygon output (VTK_HEXAHEDRON).
 
static const HexahedronWithPolygonCaseGetHexahedronWithPolygonCases ()
 Case tables for a hexahedron cell with polygon output (VTK_HEXAHEDRON).
 
static const HexahedronWithPolygonCaseGetHexahedronWithPolygonCase (uint8_t caseIndex)
 Case tables for a hexahedron cell with polygon output (VTK_HEXAHEDRON).
 
using WedgeCase = int[13]
 Case tables for a wedge cell (VTK_WEDGE).
 
static const WedgeCaseGetWedgeCases ()
 Case tables for a wedge cell (VTK_WEDGE).
 
static const WedgeCaseGetWedgeCase (uint8_t caseIndex)
 Case tables for a wedge cell (VTK_WEDGE).
 
using PyramidCase = int[13]
 Case tables for a pyramid cell (VTK_PYRAMID).
 
static const PyramidCaseGetPyramidCases ()
 Case tables for a pyramid cell (VTK_PYRAMID).
 
static const PyramidCaseGetPyramidCase (uint8_t caseIndex)
 Case tables for a pyramid cell (VTK_PYRAMID).
 

Detailed Description

Lookup tables for marching cells contouring.

vtkMarchingCellsContourCases provides the edge intersection tables used by marching cells algorithms to generate contours (isosurfaces/isolines) for each supported cell type.

For each cell type, a case index is computed by treating each vertex as a bit in a bitmask: bit i is set if vertex i's scalar value is greater than or equal to the contour value. This case index is then used to look up a list of edges that the contour surface intersects.

Each case entry is an array of edge indices terminated by -1. For surface cells (3D), edges are grouped into triangles (3 edges per triangle). For line cells (2D), edges are grouped into line segments (2 edges per segment). Edge indices refer to the cell type's own edge numbering convention, as returned by GetCellEdges().

The number of cases per cell type is 2^N where N is the number of vertices:

  • Line: 2^2 = 4 cases
  • Triangle: 2^3 = 8 cases
  • Pixel/Quad: 2^4 = 16 cases
  • Tetra: 2^4 = 16 cases
  • Voxel/Hex: 2^8 = 256 cases
  • Wedge: 2^6 = 64 cases
  • Pyramid: 2^5 = 32 cases
See also
vtkMarchingCellsClipCases

Definition at line 42 of file vtkMarchingCellsContourCases.h.

Member Typedef Documentation

◆ LineCase

Case tables for a line cell (VTK_LINE).

Each case entry is an array of 2 ints: one edge index followed by -1. There are 4 cases (2^2 vertices).

Definition at line 51 of file vtkMarchingCellsContourCases.h.

◆ TriangleCase

Case tables for a triangle cell (VTK_TRIANGLE).

Each case entry is an array of 3 ints: edge indices grouped into line segments, terminated by -1. There are 8 cases (2^3 vertices).

Definition at line 62 of file vtkMarchingCellsContourCases.h.

◆ PixelCase

Case tables for a pixel cell (VTK_PIXEL).

Each case entry is an array of 5 ints: edge indices grouped into line segments, terminated by -1. There are 16 cases (2^4 vertices). Note: vtkPixel uses a different point ordering than vtkQuad (points 2 and 3 are swapped), so this table differs from QuadCases.

Definition at line 75 of file vtkMarchingCellsContourCases.h.

◆ QuadCase

Case tables for a quad cell (VTK_QUAD).

Each case entry is an array of 5 ints: edge indices grouped into line segments, terminated by -1. There are 16 cases (2^4 vertices).

Definition at line 86 of file vtkMarchingCellsContourCases.h.

◆ TetraCase

Case tables for a tetrahedron cell (VTK_TETRA).

Each case entry is an array of 7 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 16 cases (2^4 vertices).

Definition at line 97 of file vtkMarchingCellsContourCases.h.

◆ VoxelCase

Case tables for a voxel cell (VTK_VOXEL).

Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCases.

Definition at line 111 of file vtkMarchingCellsContourCases.h.

◆ HexahedronCase

Case tables for a hexahedron cell (VTK_HEXAHEDRON).

Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices).

Definition at line 122 of file vtkMarchingCellsContourCases.h.

◆ HexahedronWithPolygonCase

Case tables for a hexahedron cell with polygon output (VTK_HEXAHEDRON).

Each case entry is an array of 17 ints: edge indices grouped into polygons, terminated by -1. There are 256 cases (2^8 vertices).

Definition at line 133 of file vtkMarchingCellsContourCases.h.

◆ WedgeCase

Case tables for a wedge cell (VTK_WEDGE).

Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 64 cases (2^6 vertices).

Definition at line 144 of file vtkMarchingCellsContourCases.h.

◆ PyramidCase

Case tables for a pyramid cell (VTK_PYRAMID).

Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 32 cases (2^5 vertices).

Definition at line 155 of file vtkMarchingCellsContourCases.h.

◆ CellCase

Generic interface to retrieve a contour case entry for any supported cell type.

Parameters
cellTypeA VTK cell type constant (e.g. VTK_HEXAHEDRON, VTK_WEDGE).
caseIndexThe case index computed from the vertex inside/outside bitmask.
Returns
A pointer to the first edge index in the case entry, terminated by -1, or a pointer to -1 if the cell type is not supported.

Definition at line 167 of file vtkMarchingCellsContourCases.h.

◆ Edge

Returns the edge definitions for the given cell type as an array of (point index pairs), where each pair defines one edge of the cell.

The array is terminated by a { -1, -1 } sentinel. Returns nullptr if the cell type is not supported.

Definition at line 176 of file vtkMarchingCellsContourCases.h.

◆ EdgeArray

Member Function Documentation

◆ GetLineCases()

static const LineCase * vtkMarchingCellsContourCases::GetLineCases ( )
static

Case tables for a line cell (VTK_LINE).

Each case entry is an array of 2 ints: one edge index followed by -1. There are 4 cases (2^2 vertices).

◆ GetLineCase()

static const LineCase & vtkMarchingCellsContourCases::GetLineCase ( uint8_t caseIndex)
static

Case tables for a line cell (VTK_LINE).

Each case entry is an array of 2 ints: one edge index followed by -1. There are 4 cases (2^2 vertices).

◆ GetTriangleCases()

static const TriangleCase * vtkMarchingCellsContourCases::GetTriangleCases ( )
static

Case tables for a triangle cell (VTK_TRIANGLE).

Each case entry is an array of 3 ints: edge indices grouped into line segments, terminated by -1. There are 8 cases (2^3 vertices).

◆ GetTriangleCase()

static const TriangleCase & vtkMarchingCellsContourCases::GetTriangleCase ( uint8_t caseIndex)
static

Case tables for a triangle cell (VTK_TRIANGLE).

Each case entry is an array of 3 ints: edge indices grouped into line segments, terminated by -1. There are 8 cases (2^3 vertices).

◆ GetPixelCases()

static const PixelCase * vtkMarchingCellsContourCases::GetPixelCases ( )
static

Case tables for a pixel cell (VTK_PIXEL).

Each case entry is an array of 5 ints: edge indices grouped into line segments, terminated by -1. There are 16 cases (2^4 vertices). Note: vtkPixel uses a different point ordering than vtkQuad (points 2 and 3 are swapped), so this table differs from QuadCases.

◆ GetPixelCase()

static const PixelCase & vtkMarchingCellsContourCases::GetPixelCase ( uint8_t caseIndex)
static

Case tables for a pixel cell (VTK_PIXEL).

Each case entry is an array of 5 ints: edge indices grouped into line segments, terminated by -1. There are 16 cases (2^4 vertices). Note: vtkPixel uses a different point ordering than vtkQuad (points 2 and 3 are swapped), so this table differs from QuadCases.

◆ GetQuadCases()

static const QuadCase * vtkMarchingCellsContourCases::GetQuadCases ( )
static

Case tables for a quad cell (VTK_QUAD).

Each case entry is an array of 5 ints: edge indices grouped into line segments, terminated by -1. There are 16 cases (2^4 vertices).

◆ GetQuadCase()

static const QuadCase & vtkMarchingCellsContourCases::GetQuadCase ( uint8_t caseIndex)
static

Case tables for a quad cell (VTK_QUAD).

Each case entry is an array of 5 ints: edge indices grouped into line segments, terminated by -1. There are 16 cases (2^4 vertices).

◆ GetTetraCases()

static const TetraCase * vtkMarchingCellsContourCases::GetTetraCases ( )
static

Case tables for a tetrahedron cell (VTK_TETRA).

Each case entry is an array of 7 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 16 cases (2^4 vertices).

◆ GetTetraCase()

static const TetraCase & vtkMarchingCellsContourCases::GetTetraCase ( uint8_t caseIndex)
static

Case tables for a tetrahedron cell (VTK_TETRA).

Each case entry is an array of 7 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 16 cases (2^4 vertices).

◆ GetVoxelCases()

static const VoxelCase * vtkMarchingCellsContourCases::GetVoxelCases ( )
static

Case tables for a voxel cell (VTK_VOXEL).

Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCases.

◆ GetVoxelCase()

static const VoxelCase & vtkMarchingCellsContourCases::GetVoxelCase ( uint8_t caseIndex)
static

Case tables for a voxel cell (VTK_VOXEL).

Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices). Note: vtkVoxel uses a different point ordering than vtkHexahedron (points 2 and 3 are swapped, as are points 6 and 7), so this table differs from HexahedronCases.

◆ GetHexahedronCases()

static const HexahedronCase * vtkMarchingCellsContourCases::GetHexahedronCases ( )
static

Case tables for a hexahedron cell (VTK_HEXAHEDRON).

Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices).

◆ GetHexahedronCase()

static const HexahedronCase & vtkMarchingCellsContourCases::GetHexahedronCase ( uint8_t caseIndex)
static

Case tables for a hexahedron cell (VTK_HEXAHEDRON).

Each case entry is an array of 16 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 256 cases (2^8 vertices).

◆ GetHexahedronWithPolygonCases()

static const HexahedronWithPolygonCase * vtkMarchingCellsContourCases::GetHexahedronWithPolygonCases ( )
static

Case tables for a hexahedron cell with polygon output (VTK_HEXAHEDRON).

Each case entry is an array of 17 ints: edge indices grouped into polygons, terminated by -1. There are 256 cases (2^8 vertices).

◆ GetHexahedronWithPolygonCase()

static const HexahedronWithPolygonCase & vtkMarchingCellsContourCases::GetHexahedronWithPolygonCase ( uint8_t caseIndex)
static

Case tables for a hexahedron cell with polygon output (VTK_HEXAHEDRON).

Each case entry is an array of 17 ints: edge indices grouped into polygons, terminated by -1. There are 256 cases (2^8 vertices).

◆ GetWedgeCases()

static const WedgeCase * vtkMarchingCellsContourCases::GetWedgeCases ( )
static

Case tables for a wedge cell (VTK_WEDGE).

Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 64 cases (2^6 vertices).

◆ GetWedgeCase()

static const WedgeCase & vtkMarchingCellsContourCases::GetWedgeCase ( uint8_t caseIndex)
static

Case tables for a wedge cell (VTK_WEDGE).

Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 64 cases (2^6 vertices).

◆ GetPyramidCases()

static const PyramidCase * vtkMarchingCellsContourCases::GetPyramidCases ( )
static

Case tables for a pyramid cell (VTK_PYRAMID).

Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 32 cases (2^5 vertices).

◆ GetPyramidCase()

static const PyramidCase & vtkMarchingCellsContourCases::GetPyramidCase ( uint8_t caseIndex)
static

Case tables for a pyramid cell (VTK_PYRAMID).

Each case entry is an array of 13 ints: edge indices grouped into triangles (3 edges per triangle), terminated by -1. There are 32 cases (2^5 vertices).

◆ GetCellCase()

static CellCase vtkMarchingCellsContourCases::GetCellCase ( int cellType,
uint8_t caseIndex )
static

◆ GetCellEdges()

static EdgeArray vtkMarchingCellsContourCases::GetCellEdges ( int cellType)
static

The documentation for this class was generated from the following file: