[vtkusers] KeyPressEvevnts
shayan moradkhani
shayan.moradkhani at gmail.com
Wed Jul 25 04:01:24 EDT 2018
hi
I am using "KeyPressEvevnts" example to apply 3d transformation on the
sphere using arrow keys.
here is the example:
"https://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/KeypressEvents"
I only added following lines:
double x = 0.0;
x = x + 1.0;
vtkSmartPointer<vtkTransform> handTransform =
vtkSmartPointer<vtkTransform>::New();
actor->SetUserTransform(handTransform);
handTransform->Translate(x, 0.0, 0.0);
and the code looked like the attached file.
KeyPressEvent.txt
<http://vtk.1045678.n5.nabble.com/file/t342474/KeyPressEvent.txt>
but when I run the program, pressing up only executes the printing line and
it does not move the sphere.
anyone has any idea why it is not working?
regards
Shayan
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list