[vtkusers] Manually setting user view transform

Bruno Oliveira bruno.manata.oliveira at gmail.com
Mon Mar 7 09:01:50 EST 2016


Hello,

I'm trying to manually set the view matrix, and I'm doing so in the
following way



vtkSmartPointer<vtkMatrix4x4> trans_mat =
vtkSmartPointer<vtkMatrix4x4>::New();

        vtkSmartPointer<vtkTransform> trans =
vtkSmartPointer<vtkTransform>::New();

        trans_mat->Identity();
        trans_mat->SetElement(2, 3, -40);

        trans->SetMatrix(trans_mat);

        camera->SetUserViewTransform(trans);


This renders the expected results, but after that, if I try to move the
scene with my mouse, everything disappears and I can't track my model
anymore. What could be happening?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160307/2718b6f8/attachment.html>


More information about the vtkusers mailing list