forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEveSceneInfo.cxx
86 lines (67 loc) · 2.82 KB
/
TEveSceneInfo.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// @(#)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;
}