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 "json.hpp"
16
17using namespace ROOT::Experimental;
18namespace REX = ROOT::Experimental;
19
20/** \class REveSceneInfo
21\ingroup REve
22Representation of a REveScene in a REveViewer. This allows for
23viewer specific settings to be applied to a scene, e.g., global position
24in viewer coordinate system.
25*/
26
27////////////////////////////////////////////////////////////////////////////////
28/// Constructor.
29
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
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
55{
56 static const REveException eH("REveSceneInfo::AcceptElement ");
57
58 // gEve->SetStatusLine(eH + "this class does not accept children.");
59 return kFALSE;
60}
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
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:40
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
REveSceneInfo(const REveSceneInfo &)
Bool_t AcceptElement(REveElement *el) override
Virtual from REveElement.
REveViewer Reve representation of TGLViewer.
Definition: REveViewer.hxx:28