[vtkusers] vtkClipVolume is quite slow
Chunyan Jiang
jiang at Telematik-Institut.de
Wed Feb 12 09:49:12 EST 2003
Hi, all,
I render a data set object. And I would like to go through the object by
clipping plane. So I use vtkClipVolume. It can work now. However, every time
when I set the clip plane and render the clipped object, it is very slow.
Before I use OpenGL to realize it by glClipPlane(GL_CLIP_PLANE0,Plane). It
is very fast comparing with vtk. Why does vtkClipVolume is so slow or did I
do something wrong. The following is the code paragraph of both vtk and
OpenGL:
----------------------------------------------------------------------------
----------------------------
ClipVolume=vtkClipVolume::New();
ClipVolume->SetInput(Data);
ClipVolume->SetClipFunction(ClipPlane);
ClipVolume->GenerateClipScalarsOff();
DataMapper=vtkDataSetMapper::New();
DataMapper->SetInput(ClipVolume->GetOutput());
DataMapper->ImmediateModeRenderingOn();
DataActor=vtkActor::New();
DataActor->SetMapper(DataMapper);
ren1->AddActor(DataActor);
----------------------------------------------------------------------------
----------------------------
List=glGenLists(1);
glNewList(List,GL_COMPILE);
glPushAttrib(GL_CURRENT_BIT);
.
.
.
.
glPopAttrib();
glEndList();
glClipPlane(GL_CLIP_PLANE0,Plane);
glEnable(GL_CLIP_PLANE0);
glCallList(List);
glDisable(GL_CLIP_PLANE0);
----------------------------------------------------------------------------
----------------------------
Any suggestion is very appreciated. Thanks in advance!
Chunyan
***********************************************************************
Chunyan Jiang, Dipl.-Inform.,
Institut for Telematic
Bahnhofstrasse 30-32, D-54292 Trier, Germany
Phone: (+49) (0)651-97551-34
Fax: (+49) (0)651-97551-12
***********************************************************************
More information about the vtkusers
mailing list