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

Maarten Beek beekmaarten at yahoo.com
Mon Aug 11 14:35:59 EDT 2014


Aaa
So I wouldn't be using:

vtkTransform* Y = vtkTransform::New();
< do stuff with Y >
X->Concatenate(Y);
X->Push();
Y->Delete();

(X would be the usertransform of the actor - Y the subtransformation created by interaction)

Maarten




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()
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 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()


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 
_______________________________________________
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:
http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140811/3f440ec3/attachment.html>


More information about the vtkusers mailing list