[vtkusers] vtkTransform::Pop() and vtkTransform::Push()
beekmaarten at yahoo.com
Mon Aug 11 14:35:59 EDT 2014
So I wouldn't be using:
vtkTransform* Y = vtkTransform::New();
< do stuff with Y >
(X would be the usertransform of the actor - Y the subtransformation created by interaction)
On Monday, August 11, 2014 2:18:39 PM, "Meehan, Bernard" <MEEHANBT at nv.doe.gov> wrote:
Are you pre-multiplying or post-multiplying your transformations?
I got tangled up a bit before I realized that the default mode was premultiply ... which means that if you do this:
xform = vtk.vtkTransform()
you get the following matrix operation on the vector x:
A B C x
when you might have wanted:
which would give you:
C B A xFrom: Maarten Beek via vtkusers <vtkusers at vtk.org>
Reply-To: Maarten Beek <beekmaarten at yahoo.com>
Date: Monday, August 11, 2014 10:49 AM
To: vtkusers <vtkusers at vtk.org>
Subject: [vtkusers] vtkTransform::Pop() and vtkTransform::Push()
I am trying to get some king of 'undo' feature in my interactor style, so that Ctrl-Z would undo the last transformation to the currently selected actor. I am currently looking at vtkTransform::Push()) and Pop(), but haven't been able to get something working.
Another way of phrasing my question would be: How am I supposed to use the Pop() and Push() functions?
Thanks - Maarten
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
Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers