[vtkusers] control with keyboard
verena kinder
verena.kinder at web.de
Fri Apr 8 12:48:38 EDT 2005
Hello!
In order to make a program like:
switch (key) {
case VTK_KEY_RIGHT : move(obj); break;
case VTK_KEY_LEFT : move(obj); break;
case VTK_KEY_UP : move(obj); break;
case VTK_KEY_DOWN : move(obj); break;
case W:
// Create transfer mapping scalar value to opacity
vtkPiecewiseFunction *tfun = vtkPiecewiseFunction::New();
tfun->AddPoint(20,0.0);
tfun->AddPoint(255,0.3);
// Create transfer mapping scalar value to color
vtkColorTransferFunction *cfun = vtkColorTransferFunction::New();
cfun->AddRGBPoint(0.0,0.0,0.0,0.0);
cfun->AddRGBPoint(64.0,1.0,0.0,0.0);
cfun->AddRGBPoint(128.0,0.0,1.0,0.0);
break;
case G:
// Create transfer mapping scalar value to opacity
vtkPiecewiseFunction *tfun = vtkPiecewiseFunction::New();
tfun->AddPoint(254,0.0);
tfun->AddPoint(255,1.0);
// Create transfer mapping scalar value to color
vtkColorTransferFunction *cfun = vtkColorTransferFunction::New();
cfun->AddRGBPoint(255.0,0.0,1.0,0.0);
}
I want to know if and how there is a possibility to interact with the keyboard and the window.
For example: If i press 'W' my Program renders with new parameter.
Thanks!
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
More information about the vtkusers
mailing list