[vtkusers] PolyData actor is invisible after applying scale(1, 1, -1)

David Doria daviddoria at gmail.com
Mon Sep 3 10:19:41 EDT 2012


On Mon, Sep 3, 2012 at 10:17 AM, zlf <jxdw_zlf at yahoo.com.cn> wrote:
> Dear David,
>
> Thank you for your response. But I still cannot see anything. My code is
>
> vtkCubeSource cubeSource = vtkCubeSource->New();
> cubeSource->SetCenter(5,5,5);
> cubeSource->SetXLength(10);
> cubeSource->SetYLength(10);
> cubeSource->SetZLength(10);
>
> vtkPolyDataMapper mapper = vtkPolyDataMapper::New();
> mapper->SetInput(cubeSource->GetOutput());
>
> vtkActor cubeActor = vtkActor::New();
> cubeActor->SetMapper(mapper);
>
> render->AddActor(cubeActor);
>
> vtkTransform transform = vtkTransform::New();
> transform->Scale(1,1,-1);
> cubeActor->GetProertry()->BackfaceCullingOff();
> cubeAcotr->SetUserTransform(transform);
>
> renderer->ResetCameraClippingRange();
> renderer->ResetCamera();
> renwin->Render();
>
> Regards,
>
> zlf


zlf,

Please post a minimal example
(http://www.vtk.org/Wiki/VTK/MinimalExample). This way David could
just copy/paste/compile/run and see your error for himself.

David



More information about the vtkusers mailing list