[vtkusers] Part of an actor invisible, the rest visible
Baris Yalcin
B.Yalcin at dkfz-heidelberg.de
Tue Jun 29 04:56:32 EDT 2004
Am Montag, 28. Juni 2004 22:52 schrieb David.Pont at ForestResearch.co.nz:
Hi Dave,
thank you for this suggestion. I tried the vtkDepthSortPolyData, but it didn't
work. Depending on the angle between the camera and the part of the object
which should be invisible, you can see or not see the invisible part.
My current pipeline is:
PolyData->TubeFilter->PolyDataMapper->Actor->Renderer
The pipeline with vtkDepthSortPolyData:
PolyData->TubeFilter->DepthSortPolyData->PolyDataMapper->Actor->Renderer
And here is the code:
------------------------------------------------------------------------------------
...
...
vtkTubeFilter tubeFilter = new vtkTubeFilter();
tubeFilter.SetInput( polyData );
vtkCamera camera = new vtkCamera();
vtkDepthSortPolyData depthSort = new vtkDepthSortPolyData();
depthSort.SetInput( tubeFilter.GetOutput() );
depthSort.SetDirectionToBackToFront(); )
depthSort.SetDepthSortModeToParametricCenter();
depthSort.SetCamera(camera);
depthSort.SortScalarsOn();
depthSort.Update();
vtkPolyDataMapper mapper = new vtkPolyDataMapper();
mapper.SetInput( depthSort.GetOutput() );
...
...
------------------------------------------------------------------------------------
Maybe I make here in the code an error with vtkDepthSortPolyData. Do you have
any idea?
Baris
> Baris,
> try vtkDepthSortPolyData
> Dave P
>
> |---------+----------------------------->
> |
> | | Baris Yalcin |
> | | <B.Yalcin at dkfz-hei|
> | | delberg.de> |
> | | Sent by: |
> | | vtkusers-bounces at v|
> | | tk.org |
> | |
> | |
> | | 28/06/2004 23:41 |
> |
> |---------+----------------------------->
> |
> >------------------------------------------------------------------------
> >--------------------------------------------------------|
> >
> | To: vtkusers at vtk.org
> | | cc:
> |
> | | Subject: [vtkusers] Part of an
> | actor invisible, the rest visible
> | |
> |
> >------------------------------------------------------------------------
> >--------------------------------------------------------|
>
> Hi everyone,
More information about the vtkusers
mailing list