Skip to content

Libs/Optimize/Utils/OptimizationVisualizer.h

Namespaces

Name
shapeworks
User usage reporting (telemetry)

Classes

Name
class shapeworks::OptimizationVisualizer

Source code

```cpp

pragma once

include

include

include

include

include

include

include

include

include

include

include "TriMesh.h"

include "ParticleSystem.h"

namespace shapeworks { class OptimizationVisualizer { public: void AddMesh(vtkPolyData mesh, std::shared_ptr tmesh); void IterationCallback(ParticleSystem particleSystem);

void SetWireFrame(bool enabled); void SetSaveScreenshots(bool enabled, std::string path);

OptimizationVisualizer() {} ~OptimizationVisualizer() {}

private: void initialize();

std::string screenshotDirectory; bool saveScreenshots = false; bool wireFrame = false; bool colorNormals = false; bool initialized = false;

double* focalPoint; int iteration = 0; double radius;

std::vector> meshes; std::vector> tmeshes;

vtkSmartPointer mapper = vtkSmartPointer::New(); vtkSmartPointer actor = vtkSmartPointer::New(); vtkSmartPointer mainRenderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer polydata = vtkSmartPointer::New(); vtkSmartPointer cubeSource = vtkSmartPointer::New();

vtkSmartPointer lineMapper = vtkSmartPointer::New(); vtkSmartPointer lineActor = vtkSmartPointer::New(); vtkSmartPointer lines = vtkSmartPointer::New();

std::vector> sampleRenderers; std::vector> sampleMappers; std::vector> samplePoints; std::vector> samplePolyData; };

} // namespace shapeworks ```


Updated on 2026-03-31 at 16:02:11 +0000