[vtkusers] Showing vtkAxesActor near the bottom left corner of a render window

Dean Inglis dean.inglis at sympatico.ca
Fri Oct 9 18:44:18 EDT 2009


Hi Prashanth:

 

try this code:

 

 

  this->AxesActor = vtkAxesActor::New();

  this->AxesActor->SetShaftTypeToCylinder();

  this->AxesActor->SetXAxisLabelText( "X" );

  this->AxesActor->SetYAxisLabelText( "Y" );

  this->AxesActor->SetZAxisLabelText( "Z" );

  this->AxesActor->SetTotalLength( 1.5, 1.5, 1.5 );

 

  this->AxesWidget = vtkOrientationMarkerWidget::New();

  // place at lower left corner

  this->AxesWidget->SetViewport( 0.0, 0.0, 0.25, 0.25 );

  this->AxesWidget->SetOrientationMarker( this->AxesActor );

  this->AxesWidget->KeyPressActivationOff();

 

Dean

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dean Inglis, PhD

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~ Centre for Appendicular ~~~~~

Magnetic Resonance Imaging Studies

          www.camris.ca

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

612 - 25 Charlton Ave. E.

Hamilton, Ontario, L8N 1Y2

fax: (905) 521-1297

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Assistant Professor (Adjunct)

Department of Civil Engineering

McMaster University

Hamilton, Ontario

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Software Demos:

 <http://www.youtube.com/watch?v=iVmMdUc1gM8>
http://www.youtube.com/watch?v=iVmMdUc1gM8

http://www.youtube.com/watch?v=_zYNtHC9-0s

 

Hi All,
 
How can I show a vtkAxesActor near the bottom left corner of the
render window at all the times? I mean irrespective of the camera
position/orientation/dolly, I would like the axes actor to always be
visible at the bottom left corner of the render window and its size
must never change.
 
Also, I have been trying hard to show axis labels, but it just doesnt
show up :-(.
 
Please help.
 
Thanks,
Prashanth

 

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


More information about the vtkusers mailing list