[vtkusers] vtkInteractorStyle etc
James C. Robinson
j.robinson at kepler-systems.com
Fri Mar 12 09:37:37 EST 2004
As I haven't had any responses yet in regard my queries, I am trying to
investigate further. One logic that coccurred to me in regard the new setup
(vtkRenderWindowInteractor having a pointer to an vtkInteractorObsever
instead of a vtkInteractorStyle) was the idea that, the very basic
functionalities required must be in vtkInteractorObsever, and then the
vtkInteractorStyle (and sub classes) are built upon this. You then put a
pointer to the base class in the vtkRenderWindowInteractor and maybe
recast(?) in your own code, depending on which subclass you use. This would
mean that one should have to new an instance of vtkInteractorStyle in one's
code explicitly and point the vtkRenderWindowInteractor at it (using
this->SetInteractorStyle())??
However, in the code for vtkRenderWindowInteractor, in its constructor we
have:
this->RenderWindow = NULL;
this->InteractorStyle = NULL;
this->SetInteractorStyle(vtkInteractorStyleSwitch::New());
this->InteractorStyle->Delete();
I am probably not understanding this clearly, but, why does it create a new
instance of vtkInteractorStyleSwitch and then destroy it?
Is my understanding in the first paragraph correct? Should I be creating a
new instance of my choice of vtkInteractorStyle in my MFCView?
Please advise.
Jim
______________________
James C. Robinson, PhD,
Chartered Engineer,
Kepler Simulation Systems Ltd.,
42 Rivergrove,
Glanmire, Co. Cork,
Eire
Tel: +353-21-4822028
Tel: +353-87-2393010
Fax: +353-21-4822028
E-mail: j.robinson at kepler-systems.com
______________________
More information about the vtkusers
mailing list