00001 // @(#)root/eve:$Id: TEveSceneInfo.cxx 24001 2008-05-23 20:58:14Z matevz $ 00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #include "TEveSceneInfo.h" 00013 #include "TEveScene.h" 00014 #include "TEveManager.h" 00015 00016 #include "TGLSceneInfo.h" 00017 00018 //______________________________________________________________________________ 00019 // TEveSceneInfo 00020 // 00021 // TEveUtil representation of TGLSceneInfo. 00022 00023 ClassImp(TEveSceneInfo) 00024 00025 //______________________________________________________________________________ 00026 TEveSceneInfo::TEveSceneInfo(TEveViewer* viewer, TEveScene* scene, TGLSceneInfo* sinfo) : 00027 TEveElement (), 00028 TNamed (Form("SI - %s", scene->GetName()), 00029 Form("TEveSceneInfo of scene '%s'", scene->GetName())), 00030 fViewer (viewer), 00031 fScene (scene), 00032 fGLSceneInfo (sinfo) 00033 { 00034 // Constructor. 00035 } 00036 00037 /******************************************************************************/ 00038 00039 //______________________________________________________________________________ 00040 TGLSceneBase* TEveSceneInfo::GetGLScene() const 00041 { 00042 // Return the TGLSceneBase represented by this SceneInfo object. 00043 00044 return fGLSceneInfo->GetScene(); 00045 } 00046 00047 /******************************************************************************/ 00048 00049 //______________________________________________________________________________ 00050 void TEveSceneInfo::AddStamp(UChar_t bits) 00051 { 00052 // Override from TEveElement. 00053 // Process visibility changes and forward them to fGLScene. 00054 00055 TEveElement::AddStamp(bits); 00056 if (bits & kCBVisibility) 00057 { 00058 fGLSceneInfo->SetActive(fRnrSelf); 00059 } 00060 } 00061 00062 /******************************************************************************/ 00063 00064 //______________________________________________________________________________ 00065 Bool_t TEveSceneInfo::AcceptElement(TEveElement* /*el*/) 00066 { 00067 // Virtual from TEveElement. 00068 // TEveSceneInfo does not accept children. 00069 00070 static const TEveException eH("TEveSceneInfo::AcceptElement "); 00071 00072 gEve->SetStatusLine(eH + "this class does not accept children."); 00073 return kFALSE; 00074 } 00075 00076 //______________________________________________________________________________ 00077 Bool_t TEveSceneInfo::HandleElementPaste(TEveElement* /*el*/) 00078 { 00079 // Virtual from TEveElement. 00080 // TEveSceneInfo does not accept children. 00081 00082 static const TEveException eH("TEveSceneInfo::HandleElementPaste "); 00083 00084 gEve->SetStatusLine(eH + "this class does not accept children."); 00085 return kFALSE; 00086 }