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

David Gobbi david.gobbi at gmail.com
Mon Aug 11 18:14:57 EDT 2014


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

 -David


More information about the vtkusers mailing list