20#ifndef vtkWebGPUCellToPrimitiveConverter_h
21#define vtkWebGPUCellToPrimitiveConverter_h
26#include "vtkRenderingWebGPUModule.h"
33VTK_ABI_NAMESPACE_BEGIN
61 TOPOLOGY_SOURCE_VERTS = 0,
75 NUM_TOPOLOGY_SOURCE_TYPES
89 vtkPolyData* mesh,
int representation, vtkTypeUInt32* vertexCounts[NUM_TOPOLOGY_SOURCE_TYPES],
90 wgpu::Buffer* topologyBuffers[NUM_TOPOLOGY_SOURCE_TYPES],
91 wgpu::Buffer* edgeArrayBuffers[NUM_TOPOLOGY_SOURCE_TYPES]);
103 vtkTypeUInt32* vertexCounts[NUM_TOPOLOGY_SOURCE_TYPES],
104 wgpu::Buffer* topologyBuffers[NUM_TOPOLOGY_SOURCE_TYPES],
105 wgpu::Buffer* edgeArrayBuffers[NUM_TOPOLOGY_SOURCE_TYPES]);
180 CreateCellToPrimitiveComputePassForCellType(
object to represent cell connectivity
a simple class to control print indentation
abstract base class for most VTK objects
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
record modification and/or execution time
Converts VTK cell connectivity arrays into webgpu primitives using compute shaders.
static vtkIdType GetTessellatedPrimitiveSizeOffsetForCellType(int cellType)
Query the integer that, when subtracted from the no.
static const char * GetTopologySourceTypeAsString(TopologySourceType topologySourceType)
Get the name of the topology source type as a string.
bool GetNeedToRebuildCellToPrimitiveComputePipeline(vtkCellArray *cells, vtkWebGPUCellToPrimitiveConverter::TopologySourceType topologySourceType)
Get whether the Cell-to-Primitive compute pipeline needs rebuilt.
bool DispatchCellToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, vtkCellArray *cells, int representation, int cellType, vtkIdType cellIdOffset, vtkTypeUInt32 *vertexCounts[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *topologyBuffers[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *edgeArrayBuffers[NUM_TOPOLOGY_SOURCE_TYPES])
Tessellates each cell into primitives.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool DispatchMeshToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, vtkPolyData *mesh, int representation, vtkTypeUInt32 *vertexCounts[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *topologyBuffers[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *edgeArrayBuffers[NUM_TOPOLOGY_SOURCE_TYPES])
Tessellates the cells in a mesh into graphics primitives.
static TopologySourceType GetTopologySourceTypeForCellType(int cellType, int representation=VTK_SURFACE)
A convenient method to get the relevant TopologyRenderInfo instance for a cellType.
static const char * GetTessellatedPrimitiveTypeAsString(TopologySourceType topologySourceType)
Get the name of the sub primitive of a VTK cell type as a string.
~vtkWebGPUCellToPrimitiveConverter() override
void UpdateCellToPrimitiveComputePipelineTimestamp(vtkWebGPUCellToPrimitiveConverter::TopologySourceType topologySourceType)
Brings the build timestamp of the compute pipeline associated with cellType up to date.
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
static const char * GetCellTypeAsString(int cellType)
Get the name of the VTK cell type as a string.
vtkWebGPUCellToPrimitiveConverter()
TopologySourceType
All supported types of topology.
@ TOPOLOGY_SOURCE_POLYGONS
@ TOPOLOGY_SOURCE_POLYGON_POINTS
@ TOPOLOGY_SOURCE_LINE_POINTS
@ TOPOLOGY_SOURCE_POLYGON_EDGES
@ NUM_TOPOLOGY_SOURCE_TYPES
static std::size_t GetTessellatedPrimitiveSize(TopologySourceType topologySourceType)
Get the number of points in the sub primitive of a VTK cell type.
static vtkWebGPUCellToPrimitiveConverter * New()
A compute pass is an abstraction for offloading computation from the CPU onto the GPU using WebGPU co...
A compute pipeline is the orchestrator of a collection of compute passes.
Create a webgpu device for use in rendering and compute pipelines.
window superclass for vtkRenderWindow