Newbie question: Using OpenGL to enhance a VTK scene
Ron Inbar
rinbar at netvision.net.il
Wed Jul 14 16:11:32 EDT 1999
Thanks for the response, David. I believe this information will be quite
helpful. What do you suggest I should do if I want to use the standard near
and far clipping planes, rather than an arbitrary plane? I believe on most
systems (including mine) the performance would be better this way, provided
I don't require a clipping plane which is not perpendicular to the direction
of projection.
A related question: can I use straight OpenGL code with VTK? If so, where
should I plug it? Are there any callbacks or handles I could use to do my
own rendering?
I suspect the answer to this is quite basic, but since I don't have the User
Guide yet, I didn't know exactly where to find it. I have the Visualization
Toolkit book, but I find it quite unsuitable for looking up such issues. I
apologize for the inconvenience.
Gratefully yours,
Ron
----- Original Message -----
From: David Gobbi <dgobbi at irus.rri.on.ca>
To: Ron Inbar <rinbar at netvision.net.il>
Cc: VTK Mailing List <vtkusers at gsao.med.ge.com>
Sent: Wednesday, July 14, 1999 20:44
Subject: Re: Newbie question: Using OpenGL to enhance a VTK scene
> Hi Ron,
>
> Recent versions of VTK (i.e. either 2.4 or the nightly releases)
> are capable of applying arbitrary OpenGL clipping planes like so:
>
> vtkPlane plane
> plane SetNormal 1.0 0.0 0.0
> plane SetOrigin 0.0 0.0 0.0
>
> vtkDataSetMapper mapper
> mapper SetInput [<something> GetOutput]
> mapper AddClippingPlane plane
>
> You will want to have two clipping planes with opposite normals,
> one for the opaque portion of the scene and one for the translucent
> portion (you can add a clipping plane to as many mappers as you want).
>
> - David
>
> --David Gobbi, MSc dgobbi at irus.rri.on.ca
> Advanced Imaging Research Group
> Robarts Research Institute, University of Western Ontario
>
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list