RE: 3D viewer in ROOT 4.02

From: Richard Maunder <Richard.Maunder_at_cern.ch>
Date: Thu, 10 Mar 2005 10:01:54 +0100


 Hi Ralf,

The changes are now in CVS - if you follow the latest version. However I would draw your (and other people's attention) to these notes:

> 1. Current scheme supports one 3D viewer only - pad, x3d or OpenGL.
This
> means that pad goes blank when x3d/OGL is spawned, and is updated
again
> when it is closed. To be revisited - need to support multiple viewers,
> of multiple types - which implies explicit naming + pad controlling
> enumeration.
>
> 2. OGL viewer now responds correct to modifications in pad, without
> having to be reinvoked (as previously). x3d is still decoupled (as
> previously) so does not rebuild - too difficult to get working.

Please let me know if you encounter any problems.

Richard

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch
[mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Richard Maunder Sent: Wednesday, March 09, 2005 9:21 AM
To: Ralf Ehrlich
Cc: Olivier Couet; roottalk_at_pcroot.cern.ch; ehrlich_at_icecube.umd.edu Subject: Re: [ROOT] 3D viewer in ROOT 4.02

Hi Ralf,

I'm not sure why the old OGL viewer would not connect to a 'readonly' pad - but there is no reason why the new one will not - so this may no longer be needed.

I presume in this case you would expect the OGL viewer to respect the non-editable state of the pad contents - if it offers editing facilities itself.

Thanks for the infomation.

Richard

On Tue, 2005-03-08 at 21:08, Ralf Ehrlich wrote:
> Hi Richard,
> thank you very much for looking into this problem.
>
> > Incidently I would be interested to know why you overload
> > ExecuteEvent()
>
> For the program I wrote I needed to set myPad->SetEditable(false) to
> prevent users from moving/changing/deleting objects inside the pad.
> The first line in TPadOpenGLView::ExecuteEvent() is/was
> if (GetPad() && !GetPad()->IsEditable()) return; That means that
> ExecuteEvent returns without doing anything, if the reference TPad is
> not editable (e.g. myPad). The same thing happens with
> TView::ExecuteEvent(). Therefore I overloaded both classes in the
> following way:
> class MyPadOpenGLView : public TPadOpenGLView {
> TPad *fPad;
>
> public:
> MyPadOpenGLView(TPad *pad):TPadOpenGLView(pad) {fPad=pad;}
> void ExecuteEvent(Int_t event, Int_t px, Int_t py)
> {
> fPad->SetEditable(true);
> TPadOpenGLView::ExecuteEvent(event,px,py);
> fPad->SetEditable(false);
> }
>
> ClassDef(MyPadOpenGLView,0);
> };
>
> Thank you vey much,
> Ralf
>
Received on Thu Mar 10 2005 - 10:02:00 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET