<HTML>
<HEAD>
<TITLE>VtkBoxWidget: Fix translation to a single axis</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi all,<BR>
I&#8217;m using the vtkBoxWidget to move some prop3d&#8217;s &nbsp;around in my scene. In my callback(Java), <BR>
I update the transform as follows to force translation to only be along the z-axis:<BR>
/**<BR>
&nbsp;&nbsp;&nbsp;&nbsp;* Method manipulateProp<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*/<BR>
&nbsp;&nbsp;&nbsp;public void manipulateProp()<BR>
&nbsp;&nbsp;&nbsp;{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(propToManipulate != null)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boxWidget.GetTransform(transform);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkMatrix4x4 matrix = transform.GetMatrix();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matrix.SetElement(0, 3, lockXYPositions[0]);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matrix.SetElement(1, 3, lockXYPositions[1]);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;propToManipulate.SetUserTransform(transform);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boxWidget.SetTransform(transform);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;}<BR>
<BR>
This works as expected however there is an output window that is reporting this deprecation error:<BR>
&#8220;Warning: In /Users/gbivins/work/APIs/VTK/Common/vtkTransform.cxx, line 202<BR>
vtkTransform (0x2295e91e0): InternalUpdate: doing hack to support legacy code. &nbsp;This is deprecated in VTK 4.2. &nbsp;May be removed in a future version.&#8221;<BR>
<BR>
What is the proper way to update the transform in my case to avoid the legacy code?<BR>
I&#8217;m using VTK 5.2 with Java wrappings on Mac OSX 10.5.5<BR>
Gerrick<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>