<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Georgia, sans-serif; ">
<div><br>
</div>
<div>Are you pre-multiplying or post-multiplying your transformations?</div>
<div>I got tangled up a bit before I realized that the default mode was premultiply ... which means that if you do this:</div>
<div><br>
</div>
<div>xform = vtk.vtkTransform()</div>
<div>xform.Push(A)</div>
<div>xform.Push(B)</div>
<div>xform.Push(C)</div>
<div><br>
</div>
<div>you get the following matrix operation on the vector x:</div>
<div><br>
</div>
<div>A B C x</div>
<div><br>
</div>
<div>when you might have wanted:</div>
<div><br>
</div>
<div>xform.PostMultiply()</div>
<div>
<div>xform.Push(A)</div>
<div>xform.Push(B)</div>
<div>xform.Push(C)</div>
</div>
<div><br>
</div>
<div>which would give you:</div>
<div><br>
</div>
<div>C B A x</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Maarten Beek via vtkusers <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
<span style="font-weight:bold">Reply-To: </span>Maarten Beek <<a href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>><br>
<span style="font-weight:bold">Date: </span>Monday, August 11, 2014 10:49 AM<br>
<span style="font-weight:bold">To: </span>vtkusers <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
<span style="font-weight:bold">Subject: </span>[vtkusers] vtkTransform::Pop() and vtkTransform::Push()<br>
</div>
<div><br>
</div>
<div>
<div>
<div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">
<div>Hi all,</div>
<div><br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">
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.
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida
Grande,sans-serif; background-color: transparent; font-style: normal;">
Any suggestions?</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">
Another way of phrasing my question would be: How am I supposed to use the Pop() and Push() functions?<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style:
normal;">
Thanks - Maarten</div>
</div>
</div>
</div>
</span>
</body>
</html>