Hi all,
I wanted to add a custom property ‘path’ to vtkActor instances. To do so I created a mixin and added it to my vtkActor instances:
const pathMixin = o => {
let path = "";
return Object.assign({}, o, {
getPath() {
return path;
},
setPath(p) {
path = p;
}
});
}
// Later
const actor = pathMixin(vtkActor.newInstance());
actor.setPath(path);
actor.setMapper(mapper);
this.renderer.addActor(actor);
So far so good. I can see the actors are correctly displayed in the scene. But, in a use case, I must remove all the actors from the scene. I do:
this.renderer.removeAllActors();
And this doesn’t work. If instead of a mixin, I add bare metal vtkActors to the scene, removeAllActors work as expected.
Is that expected ?