Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TEveSceneInfo.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include "TEveSceneInfo.h"
13#include "TEveScene.h"
14#include "TEveManager.h"
15
16#include "TGLSceneInfo.h"
17
18/** \class TEveSceneInfo
19\ingroup TEve
20TEveUtil representation of TGLSceneInfo.
21*/
22
23
24////////////////////////////////////////////////////////////////////////////////
25/// Constructor.
26
28 TEveElement (),
29 TNamed (Form("SI - %s", scene->GetName()),
30 Form("TEveSceneInfo of scene '%s'", scene->GetName())),
31 fViewer (viewer),
32 fScene (scene),
33 fGLSceneInfo (sinfo)
34{
35}
36
37////////////////////////////////////////////////////////////////////////////////
38/// Return the TGLSceneBase represented by this SceneInfo object.
39
41{
42 return fGLSceneInfo->GetScene();
43}
44
45////////////////////////////////////////////////////////////////////////////////
46/// Override from TEveElement.
47/// Process visibility changes and forward them to fGLScene.
48
50{
52 if (bits & kCBVisibility)
53 {
54 fGLSceneInfo->SetActive(fRnrSelf);
55 }
56}
57
58////////////////////////////////////////////////////////////////////////////////
59/// Virtual from TEveElement.
60/// TEveSceneInfo does not accept children.
61
63{
64 static const TEveException eH("TEveSceneInfo::AcceptElement ");
65
66 gEve->SetStatusLine(eH + "this class does not accept children.");
67 return kFALSE;
68}
69
70////////////////////////////////////////////////////////////////////////////////
71/// Virtual from TEveElement.
72/// TEveSceneInfo does not accept children.
73
75{
76 static const TEveException eH("TEveSceneInfo::HandleElementPaste ");
77
78 gEve->SetStatusLine(eH + "this class does not accept children.");
79 return kFALSE;
80}
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
Definition RtypesCore.h:52
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
externTEveManager * gEve
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2496
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
Bool_t fRnrSelf
Definition TEveElement.h:92
TEveElement()
Default constructor.
Exception class thrown by TEve classes and macros.
Definition TEveUtil.h:102
void AddStamp(UChar_t bits) override
Override from TEveElement.
Bool_t HandleElementPaste(TEveElement *el) override
Virtual from TEveElement.
TGLSceneBase * GetGLScene() const
Return the TGLSceneBase represented by this SceneInfo object.
Bool_t AcceptElement(TEveElement *el) override
Virtual from TEveElement.
TEveScene * fScene
TEveSceneInfo(const TEveSceneInfo &)
TEveViewer * fViewer
TGLSceneInfo * fGLSceneInfo
Eve representation of TGLScene.
Definition TEveScene.h:27
Eve representation of TGLViewer.
Definition TEveViewer.h:31
Scene base-class – provides basic interface expected by the TGLViewer or its sub-classes:
Base class for extended scene context.
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
TNamed()
Definition TNamed.h:38