[vtkusers] Axes: different colors
Arnaud BARRE
arnaud.barre at gmail.com
Mon Apr 8 10:10:36 EDT 2013
You don't use vtkAxesActor but vtkAxisActor. There is a small difference in
the classes' name :-)
On Mon, Apr 8, 2013 at 4:09 PM, Sensei <senseiwa at gmail.com> wrote:
> 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<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!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130408/96288814/attachment.htm>
More information about the vtkusers
mailing list