problem
Lili Liu
lliu at odd21.cs.ohiou.edu
Thu Mar 16 16:33:49 EST 2000
I'm trying to write a vtkXWindowInteractor LeftButtonPressMethod,
LeftButtonReleaseMethod, to collect the uppdated actor's origin and
normal. The funtions can be called, but the actor I picked didn't rotated
as I expected. Would someone tell me what wrong about it? Thank you
very much.
The funtions like the following:
vtkXRenderWindowInteractor *iren;
vtkXRenderWindow *renWin;
void RotateCallBack(void *arg);
void RotateNullCallBack(void *arg);
void LeftButtonPressCallBack(void *arg);
void LeftButtonReleaseCallBack(void *arg);
void main()
{
renWin = vtkXRenderWindow::New();
iren =vtkXRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
iren->SetActorModeToActor();
..
..
iren->Initialize();
iren->SetLeftButtonPressMethod(LeftButtonPressCallBack, NULL);
iren->SetLeftButtonReleaseMethod(LeftButtonReleaseCallBack, NULL);
iren->Start();
..
}
void RotateCallBack( void *arg)
{
cout<<"**\n";
iren->StartRotate();
// iren->Modified();
renWin->Render();
}
void RotateNullCallBack(void *arg)
{
cout<<"&&\n";
iren->EndRotate();
renWin->Render();
// iren->Modified();
cout<<"%%%\n";
}
void LeftButtonPressCallBack(void *arg)
{
iren->SetTimerMethod(RotateCallBack, NULL);
iren->StartTimer();
iren->Modified();
renWin->Render();
}
void LeftButtonReleaseCallBack(void *arg)
{
iren->EndTimer();
iren->SetTimerMethod(RotateNullCallBack, NULL);
renWin->Render();
// iren->Modified();
}
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list