Hello everybody. I have been trying to pass a struct of the following type:
struct ClientData {
vtkSmartPointer<vtkCamera> camera;
emscripten::val vtkCameraChangeFn;
};
Into the vtk callback functionality. In the following way:
ClientData clientData = {.camera = this->renderer->GetActiveCamera(), .vtkCameraChangeFn = vtkCameraChangeFn};
void *clientDataPointer;
clientDataPointer = &clientData;
// Set the callback to the function we created.
this->callback->SetCallback(vtkCallbackFunc);
// Set the client data.
this->callback->SetClientData(clientDataPointer);
this->renderWindowInteractor->AddObserver(vtkCommand::InteractionEvent, callback);
this->renderWindowInteractor->Initialize();
However, the Web UI chrome debugger, I seem to be receiving the following error:
I mean, as far as I understand it, a parameter of type *void should have been able to accept a structure pointer. What is the error out here and how should it be overcome?