[vtkusers] Re: Key callback example
Dominik Szczerba
domi at vision.ee.ethz.ch
Wed Jan 3 09:13:45 EST 2007
The formating will probably come out broken but should be still
understandable.
hopefully helpful,
D.S.
class MyCommand2 : public vtkCommand{
public:
void Execute(vtkObject* caller, unsigned long eventId, void* callData){
vtkRenderWindowInteractor *iren = (vtkRenderWindowInteractor *)caller;
cerr << "code=" << iren->GetKeyCode() << " sym=" << iren->GetKeySym()
<< endl;
if(string(iren->GetKeySym())=="Return"){
box->GetPlanes(planes);
}
else if(string(iren->GetKeySym())=="space"){
//do things }
else if(string(iren->GetKeySym())=="Prior"){
//do other things
}
Goodwin Lawlor wrote:
> Ricardo Seco VTK wrote:
>> Yes, do you know any example in c++?
>
> Hi Ricardo,
>
> Unfortunately, I don't, but its the same idea in principle and the
> translation is fairly straight forward.
>
> Have a go (if you want) and post your code if you're having problems.
>
> Goodwin
>
> ps discussion is best kept on the list
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list