4#ifndef vtkWebGPUComputeFrustumCuller_h
5#define vtkWebGPUComputeFrustumCuller_h
9#include "vtkRenderingWebGPUModule.h"
14VTK_ABI_NAMESPACE_BEGIN
40 vtkRenderer* renderer,
vtkProp** propList,
int& listLength,
int& initialized)
override;
55 void CreateInputBoundsBuffer(
vtkProp** propList,
unsigned int nbProps);
60 void CreateOutputIndicesBuffer(
int nbProps);
69 void CreateViewProjMatrixBuffer(
const std::vector<float>& matrixData);
77 void ResizeCuller(
vtkProp** propList,
int propsCount);
83 void ResizeBoundsBuffer(
vtkProp** propList,
int newPropsCount);
88 void ResizeOutputIndicesBuffer(
int newPropsCount);
94 void ResizeScratchList(
vtkProp** propList,
int listLength);
104 void TriggerBoundsRecomputation(
vtkProp** propList,
int listLength);
109 void UpdateBoundsBuffer(
vtkProp** propList,
int listLength);
120 static void OutputObjectCountMapCallback(
const void* mappedData,
void* userdata);
127 static void OutputObjectIndicesMapCallback(
const void* mappedData,
void* userdata);
143 struct OutputIndicesCallbackData
149 int* indicesCount =
nullptr;
152 std::vector<vtkProp*>* scratchList =
nullptr;
158 int PreviousPropsCount = -1;
167 std::vector<vtkProp*> CallbackScratchList;
170 int InputBoundsBufferIndex = -1;
172 int CameraViewProjMatrixBufferIndex = -1;
176 int OutputIndicesBufferIndex = -1;
178 int OutputObjectCountBufferIndex = -1;
a superclass for prop cullers
a simple class to control print indentation
abstract superclass for all actors, volumes and annotations
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.
This culler culls props to the camera view frustum using WebGPU compute shaders.
vtkWebGPUComputeFrustumCuller()
virtual double Cull(vtkRenderer *renderer, vtkProp **propList, int &listLength, int &initialized) override
This is called outside the render loop by vtkRenderer.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkWebGPUComputeFrustumCuller() override
static vtkWebGPUComputeFrustumCuller * New()