[vtkusers] vtkTransform::Pop() and vtkTransform::Push()

Meehan, Bernard MEEHANBT at nv.doe.gov
Mon Aug 11 14:18:44 EDT 2014


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()
xform.Push(A)
xform.Push(B)
xform.Push(C)

you get the following matrix operation on the vector x:

A B C x

when you might have wanted:

xform.PostMultiply()
xform.Push(A)
xform.Push(B)
xform.Push(C)

which would give you:

C B A x
From: Maarten Beek via vtkusers <vtkusers at vtk.org<mailto:vtkusers at vtk.org>>
Reply-To: Maarten Beek <beekmaarten at yahoo.com<mailto:beekmaarten at yahoo.com>>
Date: Monday, August 11, 2014 10:49 AM
To: vtkusers <vtkusers at vtk.org<mailto:vtkusers at vtk.org>>
Subject: [vtkusers] vtkTransform::Pop() and vtkTransform::Push()

Hi all,

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.

Any suggestions?

Another way of phrasing my question would be: How am I supposed to use the Pop() and Push() functions?

Thanks - Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140811/c7f2a033/attachment.html>


More information about the vtkusers mailing list