Re: lines & x3d

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Nov 30 1999 - 01:20:32 MET


Hi Dmitri,
In versions 2.22 or earlier, 3-d objects need two functions
 Is3D () return kTRUE;
 SizeOf3D calculating the total number of points/segments.
You must implement these two functions in your class TrackDisplay.
See examples in the existing Root 3-D primitives.

In case you need additional help, you can contact me at FNAL
where I am until Saturday.

Rene Brun

On Mon, 29 Nov 1999, Dmitri Litvintsev wrote:

> 
> 
> 
> Thank you, Rene, 
> 
> What I actually had was: 
> 
>   a class 'TrackDisplay' inherited from 'TObject' 
>   
>   TrackDisplay's being drawn in the Canvas ( Draw() )
>   
>   TrackDisplay has 'Paint' method overriden like this:
>   
>   void TrackDisplay::Paint(Option_t* opt) {
>     for (int i=0; i<TrackList()->GetEntriesFast(); i++) {
>       TrackList()->Track(i)->Paint(opt);
>     }
>   }
> 
>   class 'Track' inherits from 'TObject' and has a 
>   member 'fLine' which is 'TPolyLine3D'. 
>   
>   Track's Paint method is overriden like this:
>   
>   void Track::Paint(Option_t* opt) {
>     fLine->Paint(opt);
>   }
> 
> Scheme looks a bit perversive, but at the moment this is what 
> I need. 
> 
> So I gather I have to add  'Bool_t Is3D()' to 'TrackDisplay' 
> (I'm using v2.22/06).
> I did so and got seg. violation with:
>  
> Unable to allocate memory for point segments !
> 
> message. 
> 
> 
> 
> On Thu, 25 Nov 1999, Rene Brun wrote:
> 
> > Hi Dmitri,
> > I do not see any problem with TPolyLine3D and X3D.
> > Do you draw directly your TPolyLine3D objects or do you draw
> > your own object where you loop on TPolyLine3D objects ?
> > In the later case, 
> >   - if you use 2.22 you have to declare a function
> >        Bool_t Is3D() {return kTRUE;}
> >   - if you use 2.23 derive your class from TAtt3D
> > 
> > Rene Brun
> > 
> > Dmitri Litvintsev wrote:
> > > 
> > > Hi Rooters,
> > > 
> > > I've got a problem with x3d view of the detector (TNode) containing
> > > tracks (TPolyLine3D).
> > > 
> > > 'X3D  view' shows the detector but does not show tracks. 'OpenGL
> > > view' does display both, so it seems to be a problem here.
> > > I use ROOT v 2.22/06.
> > > 
> > > Dmitri Litvintsev
> > > 
> > > /----------------------------------------------------------\
> > > | Tel:       (630) 840 5005                                |
> > > | FAX:       (630) 840 2968                                |
> > > | office:    169-E CDF Trailers                            |
> > > | E-mail:    litvinse@fnal.gov                             |
> > > \----------------------------------------------------------/
> > 
> 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:43 MET