I draw a 3d object with TGeoManager class. Then (as I need) I did
TGLViewer *v = (TGLViewer *)gPad->GetViewer3D();
if (v) {
// now hide the left frames
TGLSAViewer *sav = (TGLSAViewer *)v;
TGCompositeFrame *vf = (TGCompositeFrame *)sav->GetLeftVerticalFrame()->GetParent();
TGFrameElement *el;
TIter next(vf->GetList());
while ((el = (TGFrameElement *) next())) {
// hide all frame but the last (the one containing the GL view)
if (el != (TGFrameElement *)vf->GetList()->Last())
vf->HideFrame(el->fFrame);
}
}
to remove everything except the 3d view (thanks root site for advise). All is good till I want to modify the scene (with AddNode() method) during runtime (to interact with user). Every AddNode() rotate the view at it’s default position.I can rotate it anyhow,
//on timer:
TGLViewer *v = (TGLViewer *)gPad->GetViewer3D();
if (v) {
// rotate a bit the current camera and update the viewer
v->CurrentCamera().RotateRad(-0.001, 0.0174532925199);
v->RequestDraw();
};
but if user has roteted it with mouse I can’t restore the right view.
I tried to use TView GetLongitude() (and GetLatitude() ) method, but unsuccessfully. Is there any standart way to get the current view angels, add (or remove) some nodes, and set the angels back?
Thank you.