ROOT
v6-26
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
12
#include <
ROOT/REveSceneInfo.hxx
>
13
#include <
ROOT/REveScene.hxx
>
14
15
#include <nlohmann/json.hpp>
16
17
using namespace
ROOT::Experimental
;
18
19
/** \class REveSceneInfo
20
\ingroup REve
21
Representation of a REveScene in a REveViewer. This allows for
22
viewer specific settings to be applied to a scene, e.g., global position
23
in viewer coordinate system.
24
*/
25
26
////////////////////////////////////////////////////////////////////////////////
27
/// Constructor.
28
29
REveSceneInfo::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
40
Int_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
53
Bool_t
REveSceneInfo::AcceptElement
(
REveElement
*
/*el*/
)
54
{
55
static
const
REveException
eH(
"REveSceneInfo::AcceptElement "
);
56
57
// gEve->SetStatusLine(eH + "this class does not accept children.");
58
return
kFALSE
;
59
}
REveSceneInfo.hxx
REveScene.hxx
kFALSE
const Bool_t kFALSE
Definition
RtypesCore.h:101
Form
char * Form(const char *fmt,...)
ROOT::Experimental::REveElement
Definition
REveElement.hxx:71
ROOT::Experimental::REveElement::WriteCoreJson
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
Definition
REveElement.cxx:1462
ROOT::Experimental::REveElement::GetElementId
ElementId_t GetElementId() const
Definition
REveElement.hxx:137
ROOT::Experimental::REveException
REveException Exception-type thrown by Eve classes.
Definition
REveTypes.hxx:41
ROOT::Experimental::REveSceneInfo::WriteCoreJson
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
Definition
REveSceneInfo.cxx:40
ROOT::Experimental::REveSceneInfo::fScene
REveScene * fScene
!
Definition
REveSceneInfo.hxx:36
ROOT::Experimental::REveSceneInfo::AcceptElement
Bool_t AcceptElement(REveElement *el) override
Virtual from REveElement.
Definition
REveSceneInfo.cxx:53
ROOT::Experimental::REveScene
Definition
REveScene.hxx:34
ROOT::Experimental::REveViewer
REveViewer Reve representation of TGLViewer.
Definition
REveViewer.hxx:28
bool
int
ROOT::Experimental
Definition
RDirectory.hxx:30
nlohmann::json
basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, adl_serializer, std::vector< std::uint8_t > > json
Definition
REveElement.hxx:48
graf3d
eve7
src
REveSceneInfo.cxx
ROOT v6-26 - Reference Guide Generated on Mon Sep 11 2023 21:02:24 (GVA Time) using Doxygen 1.9.8