A flaw in this is that there’s nothing to prevent vtkHomogeneousTransform
from being dynamically cast to vtkPerspectiveTransform
in the downstream code.
So here’s an alternative using composition and the decorator pattern where the “internal” methods are virtual. When an immutable const vtkAbstractContainer&
parameter is declared the wrapper code can generate a vtkContainerDecorator
instead.