Camera Inverting Issue when Locking Z
"Stuart, Travis" <[email protected]>
| Newsgroups | gmane.comp.lib.vtk.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm able to lock the Z axis always upwards when interacting with my camera via the code below. However, when moving the camera so that it's looking directly above or below the scene, the display will flip back and forth inverting.
Do you know of a better way to lock the Z axis or how can I prevent the camera from getting too close to being directly above or below the scene?
class Interactor(vtk.vtkInteractorStyleMultiTouchCamera):
def __init__(self):
self.AddObserver("MouseMoveEvent", self.on_mouse_move)
def on_mouse_move(self, obj, event):
camera = vtk_renderer.GetActiveCamera()
camera.SetViewUp(0, 0, 1)
self.OnMouseMove()
Regards,
Travis Stuart
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers