RE: [ROOT] Documentation about OpenGL and ROOT?

From: Valeri Fine (fine@bnl.gov)
Date: Mon Jun 09 2003 - 18:18:40 MEST


> 
> Hello,
> 
> 	I am wondering if there is any documentation about using OpenGL
in
> ROOT. I am
> specifically interested in manipulation NURBs surfaces from the
> interpreter.
> Thanks in advance for any help!
> 
[Valeri Fine] 

Hello Micha,

The OpenGL service of ROOT is described
http://www.atsweb.neu.edu/hepvis01/Site/HEPVis01_Proceedings.pdf
See: page 41. for the class diagram.

Let me clarify some details. One can find the further information
browsing ROOTTALK. This matter was discussed already.

ROOT OpenGL Service is to use 3d OpenGL rendering to visualize ROOT 3D
objects derived from TShape class and organized with some sort of
tree-like structure using the various ROOT containers. 

This means if one wants using that ROOT facility one has to create his /
her own class derived from TShape. I.e. one should do 

          class TNURBShape : public TShape {
          };

Almost all concrete shape classes ROOT provides are "derived" from
GEANT3 shapes.
See for example:
http://root.cern.ch/root/htmldoc/TPolyLineShape.html#TPolyLineShape:desc
ription 

One custom shape:
http://root.cern.ch/root/htmldoc/TXTRU.html#TXTRU:description

was not a part of GEANT and was contributed by Robert Hatcher for ROOT
package.
 
On other hand it may have been worth to create "TNURBShape" class if you
anticipated a need of 3D scene that to combine several ROOT TShapes AND
"nurb" one.

If this not what you want that you have no problem :-) 
I mean you can create you own class. The implementation of your class
may use whatever you want including OpenGL API. Then you create the ROOT
dictionary to expose your class interface to the interactive user via
your class interface.

I would like to call your attention. The HepVis talk I have referred
mentions two kind of the ROOT provided OpenGL viewers. The second one
called "Open Inventor" based does allow to mix ROOT 3D objects and
Inventor object within one 3d scene. (You can see how it works right now
by installing ROOT to your PC from http://root.bnl.gov. Try the regular
ROOT tutorials macro like "shapes.C" to see how ROOT Coin3D viewer 
(see: http://www.coin3d.org/Coin/free.php ) works 
(see: http://root.bnl.gov/QtRoot/n49CoinViewer.png )

I don't think we should go further at this point unless you clarify what
kind of the task you want to be solved.


       My best regards, Valeri


> --
> 
> Regards,
> Micha D. Niskin <mniskin@yahoo.com>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET