Eve questions

Dear all,

as thread where I asked my initial questions emerged to some more fundamental discussion, I am now asking in a new one :wink:

I managed to get my data drawn in Eve using TEveQuadSets and TEveTriangleSets. Now two questions remain (with probably obvious solutions but I just don’t see them…):

  1. How do I change the 3D viewing perspective in the code? My TBuffer3D-inspired approach (see the attached example) does not seem to work with Eve.

  2. How do I remove drawn objects from the screen in code? In the example, the deleting the QuadSet does not remove it from the screen; several attempts of forcing a redraw did not change this. (Clearing out the whole 3D scenery would be OK for me, too.)

Both tasks can be done easily using the GUI but I have to do it in a loop to change data step-by-step and export the results to image files (i.e., make a movie).

Thanks,

Moritz

PS: This is odd: If I compile the code within an MS VC++2008 project in release mode, it runs. In debug mode, it crashes in line 81 (gSystem->ProcessEvents(), runtime error). Any ideas why?

PPS: ROOT 5.22.00 VC90 (without debug symbols) / Windows Vista / Visual Studio 2008 Professional
quadtest2.C (2.69 KB)

Hi,

You need to get a pointer to TGLCamera, then you can call the Configure() function.

Now, if you are using the default Eve window, you can get the viewer as:
gEve->GetDefaultGLViewer()->CurrentCamera()
See also TGLViewer::SetCurrentCamera()

If you use some other eve viewer, get it as:
TEveViewer *ev;
ev->GetGLViewer()->CurrentCamera()

Hmmh, it should. How do you delete the elements? The proper procedure would be:
TEveElement* e;
e->Destroy();
gEve->Redraw3D();

If you only want to switch it off temporarily, you can use:
e->SetRnrSelf(kFALSE);

Best,
Matevz