<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’m using the vtkBoxWidget to move some prop3d’s 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>
* Method manipulateProp<BR>
*<BR>
*<BR>
*/<BR>
public void manipulateProp()<BR>
{<BR>
if(propToManipulate != null)<BR>
{<BR>
boxWidget.GetTransform(transform);<BR>
vtkMatrix4x4 matrix = transform.GetMatrix();<BR>
matrix.SetElement(0, 3, lockXYPositions[0]);<BR>
matrix.SetElement(1, 3, lockXYPositions[1]);<BR>
propToManipulate.SetUserTransform(transform);<BR>
boxWidget.SetTransform(transform);<BR>
}<BR>
}<BR>
<BR>
This works as expected however there is an output window that is reporting this deprecation error:<BR>
“Warning: In /Users/gbivins/work/APIs/VTK/Common/vtkTransform.cxx, line 202<BR>
vtkTransform (0x2295e91e0): InternalUpdate: doing hack to support legacy code. This is deprecated in VTK 4.2. May be removed in a future version.”<BR>
<BR>
What is the proper way to update the transform in my case to avoid the legacy code?<BR>
I’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>