[vtkusers] Troubles translating vtkAxesActor
    Ben Held 
    ben.held at staarinc.com
       
    Thu Jun 12 07:50:03 EDT 2008
    
    
  
We have a need to translate and rotate a vtkAxesActor.  I am creating a
vtkTransform and using it (via the SetUserTransform).  The lines/cones seem
to translate/rotate properly, but the labels don't want to translate (they
do rotate).  
 
This looks like a bug to me because the code in the vtkAxesActor
::UpdateProps:
 
vtkLinearTransform* transform = this->GetUserTransform();
  if ( transform )
    {
    this->XAxisShaft->SetUserTransform( transform );
    this->YAxisShaft->SetUserTransform( transform );
    this->ZAxisShaft->SetUserTransform( transform );
 
    this->XAxisTip->SetUserTransform( transform );
    this->YAxisTip->SetUserTransform( transform );
    this->ZAxisTip->SetUserTransform( transform );
 
    double newpos[3];
    double* pos = this->XAxisLabel->GetAttachmentPoint();
    transform->TransformVector( pos, newpos );
    this->XAxisLabel->SetAttachmentPoint( newpos );
 
    pos = this->YAxisLabel->GetAttachmentPoint();
    transform->TransformVector( pos, newpos );
    this->YAxisLabel->SetAttachmentPoint( newpos );
 
    pos = this->ZAxisLabel->GetAttachmentPoint();
    transform->TransformVector( pos, newpos );
    this->ZAxisLabel->SetAttachmentPoint( newpos );
    }
 
Uses TransformVector to deal with the *AxisLabel members, but
TransformVector appears to only use the rotation part of the matrix.  
Any thoughts?
 
Ben
 
 
Ben Held
Simulation Technology & Applied Research, Inc.
11520 N. Port Washington Rd., Suite 201
Mequon, WI 53092
P: 1.262.240.0291 x101
F: 1.262.240.0294
E: ben.held at staarinc.com
 <http://www.staarinc.com/> http://www.staarinc.com
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080612/4aa82471/attachment.htm>
    
    
More information about the vtkusers
mailing list