Apply transform to a camera #1049
sergei9838
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
You can access the from vedo import *
C = Cube()
plt = Plotter(axes=1)
plt.show(C, "press q")
# define a transform:
LT = LinearTransform()
LT.shift([1,0,0]).rotate_x(60)
print(LT)
# apply it to the camera:
plt.camera.ApplyTransform(LT.T)
plt.interactive() |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, Marco,
It would be nice and logical that the following code works:
Visibly, vtkCamera wants a vtkTransform, but T is vedo.transformations.LinearTransform. Yes, I can create a new vtk camera by applying T (or T.matrix) to the focal point, position and view-up vector,
but maybe there is an easier solution? For instance, transform T to vtkTransform and apply it to cam?
Or, in perspective, to make cam a new class vedo.camera with all the niceties that you already have for transforms of pointcloud?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions