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

Maarten Beek beekmaarten at yahoo.com
Tue Aug 12 08:53:20 EDT 2014

That's what I intended to use it for and I got it more-or-less working (it crashes sometimes but that could be somewhere in my code, unrelated to Pop() and Push(). Got to find it though... :-( ).

I noticed it's pushing too often when I use it each time Rotate(), Spin() etc. in the interactor style gets called. Now thinking of a new undo object that stores the current transform on its own stack when it receives a StartInteractionEvent..


On Monday, August 11, 2014 6:15:33 PM, David Gobbi <david.gobbi at gmail.com> wrote:

On Mon, Aug 11, 2014 at 12:18 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 x

I'm just going to jump in here and state, for the record, that this is
_not_ what the vtkTransform Push() method does.  All that Push()
does is save a copy of the current transform so that you can retrieve
it later with Pop().


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...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140812/082c66ff/attachment.html>

More information about the vtkusers mailing list