<br>
Looks like I can answer my own question...<br>
if I add a call to tr->MultiplyPoint before the InternalMultiply Point, tr is updated and I get the right result:<br>
<br>
tr->MultiplyPoint ( pi, po );<br>
printf ("Pt: %f %f %f %f\n", po[0], po[1], po[2], po[3]);<br>
<br>
doh... sorry for cluttering the list :/<br>
<br>
<br>
<br><br><div><span class="gmail_quote">On 1/8/06, <b class="gmail_sendername">Greg Pintilie</b> <<a href="mailto:gregvtk@gmail.com">gregvtk@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Say I have a vtkMatrix4x4 M, and I want to make a vtkTransform object have the same transform:<br>
<br>
vtkTransform *tr = vtkTransform::New();<br>
tr->SetMatrix ( M );<br>
<br>
Then I want to use this transform in a vtkBoxWidget:<br>
<br>
boxWidget->SetTransform ( tr );<br>
<br>
<br>
The thing is, the widget doesn't have the same position and orientation as my original transform!<br>
Looking at the code, the widget uses the function
tr->InternalTransformPoint, and when I checked it out using the
following code:<br>
<br>
double pi[4] = {1, 1, 1, 1};<br>
double *po = M->MultiplyDoublePoint ( pi );<br>
printf ("Pt: %f %f %f %f\n", po[0], po[1], po[2], po[3]);<br>
tr->InternalTransformPoint ( pi, po );<br>
printf ("Pt: %f %f %f\n", po[0], po[1], po[2]);<br>
<br>
I get the following output:<br>
Pt: 94.408877 -29.992743 2.359148 1.000000<br>
Pt: 1.000000 1.000000 1.000000<br>
<br>
So tr and M don't match. How do I make tr match M?<br>
<br>
Thanks for any help.<br><span class="sg">
<br>
Greg<br>
<br>
<br>
<br>
</span></blockquote></div><br>