// @(#)root/eve:$Id$
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TEveSceneInfo.h"
#include "TEveScene.h"
#include "TEveManager.h"

#include "TGLSceneInfo.h"

//______________________________________________________________________________
// TEveSceneInfo
//
// TEveUtil representation of TGLSceneInfo.

ClassImp(TEveSceneInfo)

//______________________________________________________________________________
TEveSceneInfo::TEveSceneInfo(TEveViewer* viewer, TEveScene* scene, TGLSceneInfo* sinfo) :
   TEveElement (),
   TNamed        (Form("SI - %s", scene->GetName()),
                  Form("TEveSceneInfo of scene '%s'", scene->GetName())),
   fViewer       (viewer),
   fScene        (scene),
   fGLSceneInfo  (sinfo)
{
   // Constructor.
}

/******************************************************************************/

//______________________________________________________________________________
TGLSceneBase* TEveSceneInfo::GetGLScene() const
{
   // Return the TGLSceneBase represented by this SceneInfo object.

   return fGLSceneInfo->GetScene();
}

/******************************************************************************/

//______________________________________________________________________________
void TEveSceneInfo::AddStamp(UChar_t bits)
{
   // Override from TEveElement.
   // Process visibility changes and forward them to fGLScene.

   TEveElement::AddStamp(bits);
   if (bits & kCBVisibility)
   {
      fGLSceneInfo->SetActive(fRnrSelf);
   }
}

/******************************************************************************/

//______________________________________________________________________________
Bool_t TEveSceneInfo::AcceptElement(TEveElement* /*el*/)
{
   // Virtual from TEveElement.
   // TEveSceneInfo does not accept children.

   static const TEveException eH("TEveSceneInfo::AcceptElement ");

   gEve->SetStatusLine(eH + "this class does not accept children.");
   return kFALSE;
}

//______________________________________________________________________________
Bool_t TEveSceneInfo::HandleElementPaste(TEveElement* /*el*/)
{
   // Virtual from TEveElement.
   // TEveSceneInfo does not accept children.

   static const TEveException eH("TEveSceneInfo::HandleElementPaste ");

   gEve->SetStatusLine(eH + "this class does not accept children.");
   return kFALSE;
}
 TEveSceneInfo.cxx:1
 TEveSceneInfo.cxx:2
 TEveSceneInfo.cxx:3
 TEveSceneInfo.cxx:4
 TEveSceneInfo.cxx:5
 TEveSceneInfo.cxx:6
 TEveSceneInfo.cxx:7
 TEveSceneInfo.cxx:8
 TEveSceneInfo.cxx:9
 TEveSceneInfo.cxx:10
 TEveSceneInfo.cxx:11
 TEveSceneInfo.cxx:12
 TEveSceneInfo.cxx:13
 TEveSceneInfo.cxx:14
 TEveSceneInfo.cxx:15
 TEveSceneInfo.cxx:16
 TEveSceneInfo.cxx:17
 TEveSceneInfo.cxx:18
 TEveSceneInfo.cxx:19
 TEveSceneInfo.cxx:20
 TEveSceneInfo.cxx:21
 TEveSceneInfo.cxx:22
 TEveSceneInfo.cxx:23
 TEveSceneInfo.cxx:24
 TEveSceneInfo.cxx:25
 TEveSceneInfo.cxx:26
 TEveSceneInfo.cxx:27
 TEveSceneInfo.cxx:28
 TEveSceneInfo.cxx:29
 TEveSceneInfo.cxx:30
 TEveSceneInfo.cxx:31
 TEveSceneInfo.cxx:32
 TEveSceneInfo.cxx:33
 TEveSceneInfo.cxx:34
 TEveSceneInfo.cxx:35
 TEveSceneInfo.cxx:36
 TEveSceneInfo.cxx:37
 TEveSceneInfo.cxx:38
 TEveSceneInfo.cxx:39
 TEveSceneInfo.cxx:40
 TEveSceneInfo.cxx:41
 TEveSceneInfo.cxx:42
 TEveSceneInfo.cxx:43
 TEveSceneInfo.cxx:44
 TEveSceneInfo.cxx:45
 TEveSceneInfo.cxx:46
 TEveSceneInfo.cxx:47
 TEveSceneInfo.cxx:48
 TEveSceneInfo.cxx:49
 TEveSceneInfo.cxx:50
 TEveSceneInfo.cxx:51
 TEveSceneInfo.cxx:52
 TEveSceneInfo.cxx:53
 TEveSceneInfo.cxx:54
 TEveSceneInfo.cxx:55
 TEveSceneInfo.cxx:56
 TEveSceneInfo.cxx:57
 TEveSceneInfo.cxx:58
 TEveSceneInfo.cxx:59
 TEveSceneInfo.cxx:60
 TEveSceneInfo.cxx:61
 TEveSceneInfo.cxx:62
 TEveSceneInfo.cxx:63
 TEveSceneInfo.cxx:64
 TEveSceneInfo.cxx:65
 TEveSceneInfo.cxx:66
 TEveSceneInfo.cxx:67
 TEveSceneInfo.cxx:68
 TEveSceneInfo.cxx:69
 TEveSceneInfo.cxx:70
 TEveSceneInfo.cxx:71
 TEveSceneInfo.cxx:72
 TEveSceneInfo.cxx:73
 TEveSceneInfo.cxx:74
 TEveSceneInfo.cxx:75
 TEveSceneInfo.cxx:76
 TEveSceneInfo.cxx:77
 TEveSceneInfo.cxx:78
 TEveSceneInfo.cxx:79
 TEveSceneInfo.cxx:80
 TEveSceneInfo.cxx:81
 TEveSceneInfo.cxx:82
 TEveSceneInfo.cxx:83
 TEveSceneInfo.cxx:84
 TEveSceneInfo.cxx:85
 TEveSceneInfo.cxx:86