[vtkusers] VtkBoxWidget: Fix translation to a single axis

Gerrick Bivins gbivins at objectreservoir.com
Wed Oct 8 11:25:01 EDT 2008


Hi all,
I¹m using the vtkBoxWidget to move some prop3d¹s  around in my scene. In my
callback(Java), 
I update the transform as follows to force translation to only be along the
z-axis:
/**
    * Method manipulateProp
    *
    *
    */
   public void manipulateProp()
   {
      if(propToManipulate != null)
      {
         boxWidget.GetTransform(transform);
         vtkMatrix4x4 matrix = transform.GetMatrix();
         matrix.SetElement(0, 3, lockXYPositions[0]);
         matrix.SetElement(1, 3, lockXYPositions[1]);
         propToManipulate.SetUserTransform(transform);
         boxWidget.SetTransform(transform);
      }
   }

This works as expected however there is an output window that is reporting
this deprecation error:
³Warning: In /Users/gbivins/work/APIs/VTK/Common/vtkTransform.cxx, line 202
vtkTransform (0x2295e91e0): InternalUpdate: doing hack to support legacy
code.  This is deprecated in VTK 4.2.  May be removed in a future version.²

What is the proper way to update the transform in my case to avoid the
legacy code?
I¹m using VTK 5.2 with Java wrappings on Mac OSX 10.5.5
Gerrick






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081008/77590055/attachment.htm>


More information about the vtkusers mailing list