Logo ROOT  
Reference Guide
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
13#include <ROOT/REveScene.hxx>
14
15#include <nlohmann/json.hpp>
16
17using namespace ROOT::Experimental;
18
19/** \class REveSceneInfo
20\ingroup REve
21Representation of a REveScene in a REveViewer. This allows for
22viewer specific settings to be applied to a scene, e.g., global position
23in viewer coordinate system.
24*/
25
26////////////////////////////////////////////////////////////////////////////////
27/// Constructor.
28
29REveSceneInfo::REveSceneInfo(REveViewer* viewer, REveScene* scene) :
30 REveElement (Form("SI - %s", scene->GetCName()),
31 Form("REveSceneInfo of scene '%s'", scene->GetCName())),
32 fViewer (viewer),
33 fScene (scene)
34{
35}
36
37////////////////////////////////////////////////////////////////////////////////
38/// Fill core part of JSON representation.
39
40Int_t REveSceneInfo::WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
41{
42 Int_t ret = REveElement::WriteCoreJson(j, rnr_offset);
43
44 j["fSceneId"] = fScene->GetElementId();
45
46 return ret;
47}
48
49////////////////////////////////////////////////////////////////////////////////
50/// Virtual from REveElement.
51/// REveSceneInfo does not accept children.
52
54{
55 static const REveException eH("REveSceneInfo::AcceptElement ");
56
57 // gEve->SetStatusLine(eH + "this class does not accept children.");
58 return kFALSE;
59}
int Int_t
Definition: RtypesCore.h:45
const Bool_t kFALSE
Definition: RtypesCore.h:101
bool Bool_t
Definition: RtypesCore.h:63
char * Form(const char *fmt,...)
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
ElementId_t GetElementId() const
REveException Exception-type thrown by Eve classes.
Definition: REveTypes.hxx:41
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
Bool_t AcceptElement(REveElement *el) override
Virtual from REveElement.
REveViewer Reve representation of TGLViewer.
Definition: REveViewer.hxx:28