[vtkusers] vtkRenderWindowInteractor Timer callback
Wesley Smith
wesley.hoke at gmail.com
Fri Feb 8 17:38:47 EST 2008
Hi,
I'm trying to figure out how to get the callback from a timer on a
vtkRenderWindowInteractor. I'm adding the interactor to the window
with SetRenderWindow, and then calling:
win->m_iren->CreateTimer(VTKI_TIMER_FIRST);
This is on Windows by the way. Then, I do
class myCommand : public vtkCommand
{
public:
static myCommand *New()
{ return new myCommand; }
virtual void Execute(vtkObject *caller, unsigned long, void* CBdata)
{
printf("Timer\n");
}
};
myCommand *cmd = myCommand::New();
win->m_iren->AddObserver(vtkCommand::TimerEvent, cmd);
And finally start everything up. The problem is I'm not getting any
any callbacks. Clearly since this isn't working I'm not understanding
how to do this. What is the canonical method for betting a timer
callback here? Google and the VTK docs haven't turned anything up.
thanks,
wes
More information about the vtkusers
mailing list