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