23 #ifndef vtkWebGPUCellToPrimitiveConverter_h
24 #define vtkWebGPUCellToPrimitiveConverter_h
30 #include "vtkRenderingWebGPUModule.h"
39 VTK_ABI_NAMESPACE_BEGIN
59 void ReleaseGraphicsResources(
vtkWindow*);
68 TOPOLOGY_SOURCE_VERTS = 0,
82 NUM_TOPOLOGY_SOURCE_TYPES
97 "std::array<T*, N> parameters instead.")
99 vtkPolyData* mesh,
int representation, vtkTypeUInt32* vertexCounts[NUM_TOPOLOGY_SOURCE_TYPES],
100 wgpu::Buffer* connectivityBuffers[NUM_TOPOLOGY_SOURCE_TYPES],
101 wgpu::Buffer* cellIdBuffers[NUM_TOPOLOGY_SOURCE_TYPES],
102 wgpu::Buffer* edgeArrayBuffers[NUM_TOPOLOGY_SOURCE_TYPES],
103 wgpu::Buffer* cellIdOffsetUniformBuffers[NUM_TOPOLOGY_SOURCE_TYPES]);
106 const
std::array<vtkTypeUInt32*, NUM_TOPOLOGY_SOURCE_TYPES>& vertexCounts,
107 const
std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& connectivityBuffers,
108 const
std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& cellIdBuffers,
109 const
std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& edgeArrayBuffers,
110 const
std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& cellIdOffsetUniformBuffers);
126 vertexOffsetAndCounts[NUM_TOPOLOGY_SOURCE_TYPES],
127 std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& connectivityBuffers,
128 std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& cellIdBuffers,
129 std::array<wgpu::Buffer*, NUM_TOPOLOGY_SOURCE_TYPES>& edgeArrayBuffers);
141 vtkCellArray* cells,
int representation,
int cellType, vtkTypeUInt32 cellIdOffset,
142 vtkTypeUInt32*
vertexCount, wgpu::Buffer* connectivityBuffer, wgpu::Buffer* cellIdBuffer,
143 wgpu::Buffer* edgeArrayBuffer, wgpu::Buffer* cellIdOffsetUniformBuffer);
154 vtkCellArray* cells,
int representation,
int cellType, vtkTypeUInt32 cellIdOffset,
155 vtkTypeUInt32* vertexCount, wgpu::Buffer* connectivityBuffer, wgpu::Buffer* cellIdBuffer,
156 wgpu::Buffer* edgeArrayBuffer, wgpu::Buffer* cellIdOffsetUniformBuffer,
172 std::
vector<
std::pair<vtkTypeUInt32, vtkTypeUInt32>>* vertexOffsetAndCounts,
173 wgpu::Buffer* connectivityBuffer, wgpu::Buffer* cellIdBuffer, wgpu::Buffer* edgeArrayBuffer,
181 bool GetNeedToRebuildCellToPrimitiveComputePipeline(
187 void UpdateCellToPrimitiveComputePipelineTimestamp(
197 static vtkIdType GetTessellatedPrimitiveSizeOffsetForCellType(
int cellType);
202 static const char* GetTopologySourceTypeAsString(TopologySourceType topologySourceType);
207 static const char* GetCellTypeAsString(
int cellType);
213 static const char* GetTessellatedPrimitiveTypeAsString(TopologySourceType topologySourceType);
218 static std::size_t GetTessellatedPrimitiveSize(TopologySourceType topologySourceType);
223 static TopologySourceType GetTopologySourceTypeForCellType(
240 CreateCellToPrimitiveComputePassForCellType(
242 TopologySourceType topologySourceType);
254 VTK_ABI_NAMESPACE_END
Converts VTK cell connectivity arrays into webgpu primitives using compute shaders.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
record modification and/or execution time
concrete dataset represents vertices, lines, polygons, and triangle strips
window superclass for vtkRenderWindow
a simple class to control print indentation
abstract superclass for arrays of numeric data
object to represent cell connectivity
Create a webgpu device for use in rendering and compute pipelines.
A compute pipeline is the orchestrator of a collection of compute passes.
TopologySourceType
All supported types of topology.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
#define VTK_DEPRECATED_IN_9_7_0(reason)
A compute pass is an abstraction for offloading computation from the CPU onto the GPU using WebGPU co...