[vtkusers] How to Scale vtkCubeAxesActor2D

David Doria daviddoria at gmail.com
Tue Dec 20 18:35:57 EST 2011


On Tue, Dec 20, 2011 at 5:36 PM, sergio campos <camposs968 at gmail.com> wrote:
> Hello
>
> I scaled "Z" axes polydata through vtkActor
>
>    vtkSmartPointer<vtkTransform> transform =
> vtkSmartPointer<vtkTransform>::New();
>     transform->Scale(1,1,30);
>      actor->SetUserMatrix(transform->GetMatrix())
>
> but Now when i use vtkCubeAxesActor2D :
>
> vtkSmartPointer<vtkCubeAxesActor2D>axes=
> vtkSmartPointer<vtkCubeAxesActor2D>::New();
>     axes->SetViewProp(outlineActor);
>     axes->SetCamera(ren->GetActiveCamera());
>     axes->SetLabelFormat("%6.4g");
>     axes->SetNumberOfLabels(5);
>     axes->SetFlyModeToOuterEdges();
>     axes->SetFontFactor(0.8);
>     axes->SetAxisTitleTextProperty(tprop);
>     axes->SetAxisLabelTextProperty(tprop);
>
> the scale of the label axes do not match with the data. any suggestions?
>
> regards
>
> ruben

There is no example of this class on the wiki. Please add an example here:
http://www.vtk.org/Wiki/index.php?title=VTK/Examples/Cxx/WishList/Visualization/CubeAxesActor&action=edit&redlink=1

then maybe someone can fix it for you.

David



More information about the vtkusers mailing list