[vtkusers] Axes: different colors
Sensei
senseiwa at gmail.com
Mon Apr 8 10:09:12 EDT 2013
On 4/8/13 4:04pm, Arnaud BARRE wrote:
> Dear Sensei,
>
> Did you try the vtkAxesActor
> (http://www.vtk.org/doc/nightly/html/classvtkAxesActor.html). It creates
> X/Y/Z axes with R/G/B colors.
>
> Arnaud
>
Thanks, Arnaud, I actually use the class but it shows me just white
axes, that's why I am asking this.
The code I'm using is simple and probably wrong:
// Create axes
vtkSmartPointer<vtkAxisActor> axisActor =
vtkSmartPointer<vtkAxisActor>::New();
// Setup renderer (always render axes)
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderWindow->AddRenderer(renderer);
renderer->AddActor(axisActor);
renderer->ResetCamera();
renderer->GradientBackgroundOn();
renderer->SetBackground(1.0, 1.0, 1.0);
renderer->SetBackground(0.2, 0.5, 1.0);
What am I doing wrong here?
Thanks!
More information about the vtkusers
mailing list