23#ifndef vtkWebGPUCellToPrimitiveConverter_h
24#define vtkWebGPUCellToPrimitiveConverter_h
30#include "vtkRenderingWebGPUModule.h"
39VTK_ABI_NAMESPACE_BEGIN
96 "std::array<T*, N> parameters instead.")
124 std::vector<
std::pair<vtkTypeUInt32, vtkTypeUInt32>>*
140 vtkCellArray* cells,
int representation,
int cellType, vtkTypeUInt32 cellIdOffset,
141 vtkTypeUInt32* vertexCount, wgpu::Buffer* connectivityBuffer, wgpu::Buffer* cellIdBuffer,
142 wgpu::Buffer* edgeArrayBuffer, wgpu::Buffer* cellIdOffsetUniformBuffer);
153 vtkCellArray* cells,
int representation,
int cellType, vtkTypeUInt32 cellIdOffset,
154 vtkTypeUInt32* vertexCount, wgpu::Buffer* connectivityBuffer, wgpu::Buffer* cellIdBuffer,
155 wgpu::Buffer* edgeArrayBuffer, wgpu::Buffer* cellIdOffsetUniformBuffer);
168 const
std::vector<
vtkCellArray*>& cellArrays,
int representation,
int cellType,
170 std::vector<
std::pair<vtkTypeUInt32, vtkTypeUInt32>>* vertexOffsetAndCounts,
171 wgpu::Buffer* connectivityBuffer, wgpu::Buffer* cellIdBuffer, wgpu::Buffer* edgeArrayBuffer);
237 CreateCellToPrimitiveComputePassForCellType(
object to represent cell connectivity
a simple class to control print indentation
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
record modification and/or execution time
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 DispatchCellArraysToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, const std::vector< vtkCellArray * > &cellArrays, int representation, int cellType, const std::vector< vtkIdType > &numberOfPoints, std::vector< std::pair< vtkTypeUInt32, vtkTypeUInt32 > > *vertexOffsetAndCounts, wgpu::Buffer *connectivityBuffer, wgpu::Buffer *cellIdBuffer, wgpu::Buffer *edgeArrayBuffer)
Tessellates the a collection of cell arrays into graphics primitives.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool DispatchMeshesToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, std::vector< vtkPolyData * > meshes, int representation, std::vector< std::pair< vtkTypeUInt32, vtkTypeUInt32 > > *vertexOffsetAndCounts[NUM_TOPOLOGY_SOURCE_TYPES], std::array< wgpu::Buffer *, NUM_TOPOLOGY_SOURCE_TYPES > &connectivityBuffers, std::array< wgpu::Buffer *, NUM_TOPOLOGY_SOURCE_TYPES > &cellIdBuffers, std::array< wgpu::Buffer *, NUM_TOPOLOGY_SOURCE_TYPES > &edgeArrayBuffers)
Tessellates the cells in a collection of meshes 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.
void UpdateCellToPrimitiveComputePipelineTimestamp(vtkWebGPUCellToPrimitiveConverter::TopologySourceType topologySourceType)
Brings the build timestamp of the compute pipeline associated with cellType up to date.
bool DispatchCellToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, vtkCellArray *cells, int representation, int cellType, vtkTypeUInt32 cellIdOffset, vtkTypeUInt32 *vertexCount, wgpu::Buffer *connectivityBuffer, wgpu::Buffer *cellIdBuffer, wgpu::Buffer *edgeArrayBuffer, wgpu::Buffer *cellIdOffsetUniformBuffer)
Tessellates each cell into primitives.
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.
bool DispatchMeshToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, vtkPolyData *mesh, int representation, vtkTypeUInt32 *vertexCounts[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *connectivityBuffers[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *cellIdBuffers[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *edgeArrayBuffers[NUM_TOPOLOGY_SOURCE_TYPES], wgpu::Buffer *cellIdOffsetUniformBuffers[NUM_TOPOLOGY_SOURCE_TYPES])
Tessellates the cells in a mesh into graphics primitives.
bool DispatchCellArrayToPrimitiveComputePipeline(vtkWebGPUConfiguration *wgpuConfiguration, vtkCellArray *cells, int representation, int cellType, vtkTypeUInt32 cellIdOffset, vtkTypeUInt32 *vertexCount, wgpu::Buffer *connectivityBuffer, wgpu::Buffer *cellIdBuffer, wgpu::Buffer *edgeArrayBuffer, wgpu::Buffer *cellIdOffsetUniformBuffer)
Tessellates each cell into primitives.
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
#define VTK_DEPRECATED_IN_9_7_0(reason)