<div>I want to have this setup:</div><div><br></div><div>Superclass: </div><div>PointSelectionStyle - derives from vtkInteractorStyle, defines some virtual functions like AddPoint, DeletePoint, etc</div><div><br></div><div>
Subclasses:</div><div>PointSelectionStyle2D - derives from vtkInteractorStyleImage and PointSelectionStyle</div>
PointSelectionStyle3D - derives from vtkInteractorStyleTrackballCamera and PointSelectionStyle<div>
<br></div><div>The problem is here:</div><div><br></div><div><div>class PointSelectionStyle2D : public vtkInteractorStyleImage, public PointSelectionStyle</div><div>{</div><div>  public:</div><div>    static PointSelectionStyle2D* New();</div>
<div>    vtkTypeMacro(PointSelectionStyle2D, vtkInteractorStyleImage);</div></div><div><br></div><div>on the vtkTypeMacro line, I get:</div><div><br></div><div><div>PointSelectionStyle2D.h:37:5: error: ‘vtkObjectBase’ is an ambiguous base of ‘PointSelectionStyle2D’</div>
<div><br></div><div>After some Googling, it seems like I need to use virtual inheritance:</div><div><br></div><div>class PointSelectionStyle : virtual public vtkInteractorStyle</div><div><br></div><div>but I guess the problem is that vtkInteractorStyleImage does not virtually inherit vtkInteractorStyle as well? Is there anything that can be done here?</div>
<div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8">Thanks,<br><br>David<br>
</div>