Compose actors into an actor / group

I’m trying to create a custom vtkOrientationMarkerWidget that looks like a compass rose. I’m going about this by creating an actor to replace the default axes using vtkAppendPolyData that would include some textured planes for the cardinal direction labels. I’ve been able to create a polydata with the compass rose, and a plane with a texture that indicates a cardinal direction.

I’m confused as to how to put them together and return them as something that looks like a vtkActor. Or alternatively, is there a better way to create this element?

Desired result:
Screen Shot 2022-03-22 at 5.55.40 PM

vtkAppendPolyData with planes for cardinal directions:

vtkActor with a texture applied:

Here’s how I’m creating the vtkOrientationMarker Widget:

  const axes = compassRoseIndicator()
  const orientationWidget = vtkOrientationMarkerWidget.newInstance({
    actor: axes,
    interactor: renderWindow.getInteractor(),

Any help would be greatly appreciated! :pray:Thanks in advance!

I just realized I could draw this whole set of glyphs onto a single canvas texture and just do it that way. Please let me know if you have any better ideas. Thanks in advance!

Using a texture seems to be the simplest approach.

1 Like