diff --git a/library/VTKExtensions/Applicative/Testing/TestF3DObjectFactory.cxx b/library/VTKExtensions/Applicative/Testing/TestF3DObjectFactory.cxx index 14263571c8..118a275741 100644 --- a/library/VTKExtensions/Applicative/Testing/TestF3DObjectFactory.cxx +++ b/library/VTKExtensions/Applicative/Testing/TestF3DObjectFactory.cxx @@ -50,6 +50,7 @@ int TestF3DObjectFactory(int argc, char* argv[]) #if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 3, 20240202) vtkNew pointMapper; + pointMapper->Print(cout); vtkF3DPointSplatMapper* pointMapperPtr = vtkF3DPointSplatMapper::SafeDownCast(pointMapper); if (pointMapperPtr == nullptr) { diff --git a/library/VTKExtensions/Rendering/Testing/TestF3DBitonicSort.cxx b/library/VTKExtensions/Rendering/Testing/TestF3DBitonicSort.cxx index e792559c4b..b255e7ea62 100644 --- a/library/VTKExtensions/Rendering/Testing/TestF3DBitonicSort.cxx +++ b/library/VTKExtensions/Rendering/Testing/TestF3DBitonicSort.cxx @@ -27,18 +27,18 @@ int TestF3DBitonicSort(int argc, char* argv[]) return EXIT_SUCCESS; } - constexpr int nbElements = 1e5; + constexpr int nbElements = 10000; // fill CPU keys and values buffers - std::array keys; - std::array values; + std::vector keys(nbElements); + std::vector values(nbElements); std::random_device dev; std::mt19937 rng(dev()); - std::uniform_int_distribution dist(0, 100 * nbElements); + std::uniform_real_distribution dist(0.0, 1.0); std::generate(std::begin(keys), std::end(keys), [&]() { return dist(rng); }); - std::fill(std::begin(values), std::end(values), -1); // we do not care about the values + std::fill(std::begin(values), std::end(values), 0); // we do not care about the values // upload these buffers to the GPU vtkNew bufferKeys; @@ -49,7 +49,7 @@ int TestF3DBitonicSort(int argc, char* argv[]) // sort vtkNew sorter; - sorter->Initialize(128, VTK_UNSIGNED_INT, VTK_UNSIGNED_INT); + sorter->Initialize(128, VTK_DOUBLE, VTK_INT); sorter->Run(vtkOpenGLRenderWindow::SafeDownCast(renWin), nbElements, bufferKeys, bufferValues); // download sorted key buffer to CPU diff --git a/library/VTKExtensions/Rendering/vtkF3DBitonicSort.cxx b/library/VTKExtensions/Rendering/vtkF3DBitonicSort.cxx index 174e4d290c..51671c2ef8 100644 --- a/library/VTKExtensions/Rendering/vtkF3DBitonicSort.cxx +++ b/library/VTKExtensions/Rendering/vtkF3DBitonicSort.cxx @@ -14,6 +14,8 @@ #include "vtkF3DBitonicSortLocalDisperseCS.h" #include "vtkF3DBitonicSortLocalSortCS.h" +#include + //---------------------------------------------------------------------------- vtkStandardNewMacro(vtkF3DBitonicSort); @@ -26,7 +28,7 @@ void vtkF3DBitonicSort::Initialize(int workgroupSize, int keyType, int valueType return; } - auto toShaderType = [](int vtkType) -> std::string + auto GetStringShaderType = [](int vtkType) -> std::string { switch (vtkType) { @@ -42,14 +44,14 @@ void vtkF3DBitonicSort::Initialize(int workgroupSize, int keyType, int valueType return ""; }; - std::string keyTypeShader = toShaderType(keyType); + std::string keyTypeShader = GetStringShaderType(keyType); if (keyTypeShader.empty()) { vtkErrorMacro("Invalid keyType"); return; } - std::string valueTypeShader = toShaderType(valueType); + std::string valueTypeShader = GetStringShaderType(valueType); if (valueTypeShader.empty()) { vtkErrorMacro("Invalid valueType"); diff --git a/library/VTKExtensions/Rendering/vtkF3DPointSplatMapper.cxx b/library/VTKExtensions/Rendering/vtkF3DPointSplatMapper.cxx index 9253ae045f..c711a74d66 100644 --- a/library/VTKExtensions/Rendering/vtkF3DPointSplatMapper.cxx +++ b/library/VTKExtensions/Rendering/vtkF3DPointSplatMapper.cxx @@ -26,6 +26,9 @@ class vtkF3DSplatMapperHelper : public vtkOpenGLPointGaussianMapperHelper static vtkF3DSplatMapperHelper* New(); vtkTypeMacro(vtkF3DSplatMapperHelper, vtkOpenGLPointGaussianMapperHelper); + vtkF3DSplatMapperHelper(const vtkF3DSplatMapperHelper&) = delete; + void operator=(const vtkF3DSplatMapperHelper&) = delete; + protected: vtkF3DSplatMapperHelper(); @@ -36,9 +39,6 @@ class vtkF3DSplatMapperHelper : public vtkOpenGLPointGaussianMapperHelper void RenderPieceDraw(vtkRenderer* ren, vtkActor* act) override; private: - vtkF3DSplatMapperHelper(const vtkF3DSplatMapperHelper&) = delete; - void operator=(const vtkF3DSplatMapperHelper&) = delete; - void SortSplats(vtkRenderer* ren); vtkNew DepthComputeShader; diff --git a/plugins/native/module/vtkF3DSplatReader.h b/plugins/native/module/vtkF3DSplatReader.h index 28fcc2f69d..24a4fb7cbd 100644 --- a/plugins/native/module/vtkF3DSplatReader.h +++ b/plugins/native/module/vtkF3DSplatReader.h @@ -17,13 +17,10 @@ class vtkF3DSplatReader : public vtkPolyDataAlgorithm vtkTypeMacro(vtkF3DSplatReader, vtkPolyDataAlgorithm); void PrintSelf(ostream& os, vtkIndent indent) override; - ///@{ /** - * Get/Set the file name. + * Set the file name. */ vtkSetMacro(FileName, std::string); - vtkGetMacro(FileName, std::string); - ///@} protected: vtkF3DSplatReader();