<div dir="ltr">When I contributed the "transform concatenation" feature to VTK (long, long ago) there was some discussion about how it should be done.  I wanted to have just concatenation, and didn't really see much need for SetInput().<div><br></div><div>Ken Martin thought SetInput() was more consistent with VTK's design (at least I think it was him, this was a long time ago).</div><div><br></div><div>Lisa Avila thought it would be better for transforms (or perhaps matrices) to be lightweight data objects, and to add special filter classes for dynamic transform concatenation, rather than to have the dynamic features built into the transforms themselves.</div><div><br></div><div>The final design was a compromise: both Concatenate(vtkTransform *) and SetInput(vtkTransform *) were added.  In retrospect, I think Lisa's suggestion of having an explicit set of "transform filters" would have resulted in a cleaner design.  The concatenation feature adds a fair bit of weight and complexity to vtkTransform even though it's a feature that people rarely use.</div><div><br></div><div> - David</div><div> <br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 9:25 AM, Patrick Bergeron <span dir="ltr"><<a href="mailto:pbergeron@spiria.com" target="_blank">pbergeron@spiria.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-CA" link="blue" vlink="purple">
<div class="m_-6578028226410364307WordSection1">
<p class="MsoNormal"><span lang="EN-US">Ok, yes, I just saw that too.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">If you can do transform mixes using concatenations, why is there an input ?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">vtk-developers <<a href="mailto:vtk-developers-bounces@public.kitware.com" target="_blank">vtk-developers-bounces@<wbr>public.kitware.com</a>> on behalf of David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>><br>
<b>Date: </b>Tuesday, June 5, 2018 at 11:13 AM<br>
<b>To: </b>Andras Lasso <<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>><br>
<b>Cc: </b>"<a href="mailto:vtk-developers@public.kitware.com" target="_blank">vtk-developers@public.<wbr>kitware.com</a>" <<a href="mailto:vtk-developers@public.kitware.com" target="_blank">vtk-developers@public.<wbr>kitware.com</a>><br>
<b>Subject: </b>Re: [vtk-developers] Improvements to the transform pipeline (3 vtkTransform derived classes).<u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><a name="m_-6578028226410364307__MailOriginalBody">Hi Andras, Patrick,<u></u><u></u></a></p>
</div>
<div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span>I'd just like to add that vtkTransform itself supports dynamic concatenation, it isn't necessary to use vtkGeneralTransform unless you want to concatenate nonlinear transformations.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span>Here's an example (unfortunately it was auto-converted to Python from Tcl so it's poorly formatted):<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span></span><a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/Core/Testing/Python/TransformConcatenation.py" target="_blank"><span>https://gitlab.kitware.com/<wbr>vtk/vtk/blob/master/Rendering/<wbr>Core/Testing/Python/<wbr>TransformConcatenation.py</span><span></span></a><span><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span> - David<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
</div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span>On Tue, Jun 5, 2018 at 9:06 AM, Andras Lasso <</span><a href="mailto:lasso@queensu.ca" target="_blank"><span>lasso@queensu.ca</span><span></span></a><span>>
 wrote:<u></u><u></u></span></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span><span lang="EN-US">Hi Patrick,<u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span lang="EN-US"> <u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span lang="EN-US">I think these problems are already solved, since you can dynamically concatenate any number of transforms in any
 combinations (including inverting them) using vtkGeneralTransform.<u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span lang="EN-US"> <u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span lang="EN-US">Regarding your solution proposed for “problem” 3: Ability to temporarily bypass a transform without changing the
 pipeline would be a feature that I would find useful. Some warping transforms already have scale parameter for enabling/disabling (or slightly emphasizing or de-emphasizing) a transformation, which comes very handy for visualizing the effect of the transformation.
 This feature could be generalized and moved to vtkAbstractTransform class.<u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span lang="EN-US"> <u></u><u></u></span></span></p>
<p class="MsoNormal"><span><span lang="EN-US">Andras<u></u><u></u></span></span></p>
<div>
<div>
<p class="MsoNormal"><span><span lang="EN-US"> <u></u><u></u></span></span></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span><span lang="EN-US">---------- Forwarded message ----------<br>
From: <b>Patrick Bergeron</b> <</span></span><a href="mailto:pbergeron@spiria.com" target="_blank"><span><span lang="EN-US">pbergeron@spiria.com</span></span><span></span></a><span><span lang="EN-US">><br>
Date: Tue, Jun 5, 2018 at 10:33 AM<br>
Subject: [vtk-developers] Improvements to the transform pipeline (3 vtkTransform derived classes).<br>
To: "</span></span><a href="mailto:vtk-developers@public.kitware.com" target="_blank"><span><span lang="EN-US">vtk-developers@public.<wbr>kitware.com</span></span><span></span></a><span><span lang="EN-US">"
 <</span></span><a href="mailto:vtk-developers@public.kitware.com" target="_blank"><span><span lang="EN-US">vtk-developers@public.<wbr>kitware.com</span></span><span></span></a><span><span lang="EN-US">><u></u><u></u></span></span></p>
<div>
<div id="m_-6578028226410364307gmail-m_7854218472602219613m_4896201940082277444divtagdefaultwrapper">
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Hi everyone.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">I've been using VTK for a bit now, and I've made a few improvements I'd like to contribute to the community. </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Before I do, however, I'd like to know if there is interest in me doing so before I go through the hassles of submission.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">GENERAL PROBLEM STATEMENT  (MOTIVATION)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">------------------------------<wbr>------------------------------<wbr>---</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">I have a list of objects that I'd like to transform using a single widget. Widgets take a single vtkProp3D as target.
 For (multiple) reasons beyond the scope of this discussion, I couldn't use vtkAssembly to target my multiple actors. Plus, I wanted each actor to transform according to their local reference frame, not the reference frame of the vtkAssembly.  </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">PROBLEM (1/3)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">---------------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">vtkTransform can take as input another vtkTransform, to which it concatenates its own SRT values,  its output being
 it the concatenation of the input transform and itself.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">This is useful and allows for multiple scenarios, including this common pattern of parent-child hierarchical chain
 of transforms, as is shown in this Robot-Arm example. </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span></span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK%2FExamples%2FCxx%2FPolyData%2FTransformPipeline&data=02%7C01%7Classo%40queensu.ca%7C6b89e9286a8c496b460808d5caf28d0e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636638065458569187&sdata=pXnPwQTqvWrH1L2NOrQR33gpasKrz2H3CEtfwRXSMqg%3D&reserved=0" target="_blank"><span><span lang="EN-US" style="font-size:12.0pt">https://www.vtk.org/Wiki/VTK/<wbr>Examples/Cxx/PolyData/<wbr>TransformPipeline</span></span><span></span></a><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">In the example above, 3 transforms are chained together, and   </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">xform1 --to--> xform2's input ,   xform2's output -- to --> xform3's input.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">xform1 is set as the user transform of the root actor</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">xform2 is set as the user transform of the mid actor</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">xform3 is set as the user transform of the leaf actor</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">In other words, the *parent's transform* is inherited, and each actor's *local transformation* is controlled by
 calling the normal functions, such as TranslateX, RotateY, etc, and when concatenated provides the actor's *global transform*</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">That's all fine, as long as you want to, or can, control each of the local transform directly.  But what if you'd
 like to also control the *local transform* via another transformation pipeline?  The vtkTransform's input is already taken by the parent transform, were would I plug the local transform's input?</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">SOLUTION (1/3) --  Introducing <wbr>vtkDualInputTransform</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">------------------------------<wbr>------------------------------<wbr>------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">As its name implies, vtkDualInput transform adds a second input (Input2) to the standard vtkTransform.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Whereas the vtkTransform's output was :   GetMatrix() = [INPUT][MYSELF],  </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Then vtkDualInputTransform's putput is : GetMatrix() = [INPUT][INPUT2] [MYSELF]</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">(with adaptations wrt Pre-Post multiply flag).</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">In vtkDualInputTransform, both <wbr>Input1 and Input2 can be muted, so that they are skipped, just as if there was no
 input connected.  (It's like closing a gate)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">ADVANTAGES</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">-------------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">With the vtkDualInputTransform, you can create complex chains of transforms that allows for direct control of different parts
 of the transform multiple actors from a single source.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">In my case, Input1 is the parent transform, Input2 is the local transform, and  I leave the internals alone (set
 to Identity).</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">The result is thus GetMatrix() = [INPUT][INPUT2][IDENTITY]  = [INPUT][INPUT2]</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Using this pattern, I have 100 actors driven by different pipelines, yet I can affect all of them at once by changing
 a common transformation pipeline that is plugged into the second input. </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">PROBLEM (2/3)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">---------------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">With the vtkDualInputTransform in place, which I could plug into an Actor's
 UserTransform, I could now effect the global transform using 2 transformation pipelines (its parent tranform, and its local transform).
</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">But, what if I wanted to transform my actors by setting affecting their local transforms using another actor as
 the driver? </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">(why? because a widget targets a prop/actor, and I want the changes to the targetted actor's transformation to propagate
 down to a transformation pipeline to affect other actors)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">In other words, I want: </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">widget -> actorA's transform -> input of vtkTransform --> input of vtkTransform --> input of vtkTansform --> input
 of actorB, actorC, actorD (etc)'s UserTransform.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black">While we can do actorA's GetMatrix() (which is the concat of its input and own pos/ori/scale/origin/etc), <wbr>there
 is unfortunately, there is no way to do actor->GetTransform() (since it might get pushed/popped from the stack, it might not always be valid, might disappear etc).   So how do I drive a transform pipeline from an actor?</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">SOLUTION (2/3) --  Introducing <wbr>vtkProp3DTransformAdapter</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">------------------------------<wbr>------------------------------<wbr>-------------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">This is another derivative of vtkTransform. It has a SetProp3D method, which serves the same purpose as the vtkTransform's input.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">(in fact, vtkProp3DTransformAdapter's input is not used, and a warning is issued if it is)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">In vtkProp3DTransformAdapter, in the InternalUpdate method, instead of calling Input->GetMatrix(), we simply call prop3D->GetMatrix(), which ensures is always
 valid.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">PROBLEM (3/3)</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">--------------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">Finally, there's a catch: I want to affect multiple actors's global transform but control the local transform, but there's a catch when doing [INPUT][INPUT2].</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">Indeed, that concatenation is (roughly) the equivalent of: </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">Result = [IN_scl] x [IN_ori] x [IN_trs] x [IN2_scl] x [IN2_ori] x [IN2_trs].</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">In other words, by the time we multiply IN2, IN's translation is already considered, so scale and rotation of the 2nd input will have their transformation
 center set to IN's translation, which a problem.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">What I want instead is consider the concatenation of the scale, orientation, and transformation :</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black">Result = [IN_scl] x [IN2_scl]   x   [IN_ori] x [IN2_ori]   x   [IN_trs] x [IN2_trs].</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">SOLUTION (3/3) -- Introducing vtkMutableTransform</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">------------------------------<wbr>------------------------------<wbr>---------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Unfortunately, I did not find a proper name for this one, as "mutable" can imply
 "changeable".   But I meant it to mean that you could "mute" portions of the transform. </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">The goal of this derived class is that you feed it a transform, and out comes
 the same transform without the muted portions. For example, the transform's output is the same as the input, with scaling, orientation, or translation stripped out. </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">CONCLUSION: </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">--------------------</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Using the proper combination of the 3 vtkTransform derivatives described above,
 and chained together in the proper order, you can make a transformation graph that is fully automated and controllable from any point or any source in the transform pipeline.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<p><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Let me know if there is interest in me submitting these 3 classes.</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black"> </span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:black">Regards</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US" style="font-size:12.0pt;color:#888888">Patrick Bergeron</span></span><span><span lang="EN-US"><u></u><u></u></span></span></p>
</div>
<div>
<p class="MsoNormal"><span><span lang="EN-US"><u></u> <u></u></span></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div></div></div>