Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
REveSceneInfo.cxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, 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 <ROOT/REveSceneInfo.hxx>
13 #include <ROOT/REveScene.hxx>
14 
15 #include "json.hpp"
16 
17 using namespace ROOT::Experimental;
18 namespace REX = ROOT::Experimental;
19 
20 /** \class REveSceneInfo
21 \ingroup REve
22 Representation of a REveScene in a REveViewer. This allows for
23 viewer specific settings to be applied to a scene, e.g., global position
24 in viewer coordinate system.
25 */
26 
27 ////////////////////////////////////////////////////////////////////////////////
28 /// Constructor.
29 
30 REveSceneInfo::REveSceneInfo(REveViewer* viewer, REveScene* scene) :
31  REveElement (Form("SI - %s", scene->GetCName()),
32  Form("REveSceneInfo of scene '%s'", scene->GetCName())),
33  fViewer (viewer),
34  fScene (scene)
35 {
36 }
37 
38 ////////////////////////////////////////////////////////////////////////////////
39 /// Fill core part of JSON representation.
40 
41 Int_t REveSceneInfo::WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
42 {
43  Int_t ret = REveElement::WriteCoreJson(j, rnr_offset);
44 
45  j["fSceneId"] = fScene->GetElementId();
46 
47  return ret;
48 }
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /// Virtual from REveElement.
52 /// REveSceneInfo does not accept children.
53 
54 Bool_t REveSceneInfo::AcceptElement(REveElement* /*el*/)
55 {
56  static const REveException eH("REveSceneInfo::AcceptElement ");
57 
58  // gEve->SetStatusLine(eH + "this class does not accept children.");
59  return kFALSE;
60 }