[vtk-developers] vtkAxesActor bug with SetUserTransform
pat marion
pat.marion at kitware.com
Mon Mar 16 16:44:15 EDT 2009
If you create a vtkAxesActor and then call this method...
void SetUserTransform<http://www.vtk.org/doc/nightly/html/classvtkProp3D.html#ac7f621f0a3666a29d21b5087919797a>(
vtkLinearTransform<http://www.vtk.org/doc/nightly/html/classvtkLinearTransform.html>*transform)
...the axis labels will be oriented correctly but not translated with the
axes. I want to make sure this is a bug and not a "feature" that somebody
relies on. Here is a fix I could commit:
Index: Hybrid/vtkAxesActor.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Hybrid/vtkAxesActor.cxx,v
retrieving revision 1.5
diff -u -3 -r1.5 vtkAxesActor.cxx
--- Hybrid/vtkAxesActor.cxx 5 Mar 2007 13:50:12 -0000 1.5
+++ Hybrid/vtkAxesActor.cxx 16 Mar 2009 19:29:41 -0000
@@ -748,15 +748,15 @@
double newpos[3];
double* pos = this->XAxisLabel->GetAttachmentPoint();
- transform->TransformVector( pos, newpos );
+ transform->TransformPoint( pos, newpos );
this->XAxisLabel->SetAttachmentPoint( newpos );
pos = this->YAxisLabel->GetAttachmentPoint();
- transform->TransformVector( pos, newpos );
+ transform->TransformPoint( pos, newpos );
this->YAxisLabel->SetAttachmentPoint( newpos );
pos = this->ZAxisLabel->GetAttachmentPoint();
- transform->TransformVector( pos, newpos );
+ transform->TransformPoint( pos, newpos );
this->ZAxisLabel->SetAttachmentPoint( newpos );
}
Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090316/2ddb9333/attachment.html>
More information about the vtk-developers
mailing list