Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveViewer.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/REveViewer.hxx>
13#include <ROOT/REveCamera.hxx>
14#include <ROOT/REveUtil.hxx>
15#include <ROOT/REveScene.hxx>
17#include <ROOT/REveManager.hxx>
19#include <ROOT/REveText.hxx>
20
21#include <nlohmann/json.hpp>
22#include "TROOT.h"
23
24using namespace ROOT::Experimental;
25namespace REX = ROOT::Experimental;
26
27/** \class REveViewer
28\ingroup REve
29Eve representation of a GL view. In a gist, it's a camera + a list of scenes.
30
31*/
32
33////////////////////////////////////////////////////////////////////////////////
34/// Constructor.
35
36REveViewer::REveViewer(const std::string& n, const std::string& t) :
37 REveElement(n, t),
38 fCamera(nullptr)
39{
41}
42
43////////////////////////////////////////////////////////////////////////////////
44/// Destructor.
45
48
49////////////////////////////////////////////////////////////////////////////////
50/// Redraw viewer immediately.
51
52void REveViewer::Redraw(Bool_t /*resetCameras*/)
53{
54 // if (resetCameras) fGLViewer->PostSceneBuildSetup(kTRUE);
55 // fGLViewer->RequestDraw(TGLRnrCtx::kLODHigh);
56}
57
58////////////////////////////////////////////////////////////////////////////////
59/// Add 'scene' to the list of scenes.
60
62{
63 static const REveException eh("REveViewer::AddScene ");
64
65 for (auto &c: RefChildren()) {
66 auto sinfo = dynamic_cast<REveSceneInfo*>(c);
67
68 if (sinfo && sinfo->GetScene() == scene)
69 {
70 throw eh + "scene already in the viewer.";
71 }
72 }
73
74 auto si = new REveSceneInfo(this, scene);
75 AddElement(si);
76}
77
78////////////////////////////////////////////////////////////////////////////////
79/// Remove element 'el' from the list of children and also remove
80/// appropriate GLScene from GLViewer's list of scenes.
81/// Virtual from REveElement.
82
84{
85 // fGLViewer->RemoveScene(((REveSceneInfo*)el)->GetGLScene());
86
87 // XXXXX Notify clients !!! Or will this be automatic?
88}
89
90////////////////////////////////////////////////////////////////////////////////
91/// Remove all children, forwarded to GLViewer.
92/// Virtual from REveElement.
93
95{
96 // fGLViewer->RemoveAllScenes();
97
98 // XXXXX Notify clients !!! Or will this be automatic?
99}
100
101
102/** \class REveViewerList
103\ingroup REve
104List of Viewers providing common operations on REveViewer collections.
105*/
106
107////////////////////////////////////////////////////////////////////////////////
108//
110{
111 fAxesType = (EAxesType)at;
112 if (fAxesType != kAxesNone) {
113 std::string fn = "LiberationSerif-Regular";
114 std::string rf_dir = std::string(TROOT::GetDataDir().Data()) + "/fonts/";
115 REX::REveText::AssertSdfFont(fn, rf_dir + fn + ".ttf");
116 }
118}
119
120////////////////////////////////////////////////////////////////////////////////
121/// Fix the volume the 3D axis spans, as {min, max} per coordinate, instead of
122/// following the scene contents. Only the axis and the clip box use it; camera
123/// framing uses the content.
124
125// clang-format off
128{
129 fAxesBBox[0] = xmin; fAxesBBox[1] = ymin; fAxesBBox[2] = zmin;
130 fAxesBBox[3] = xmax; fAxesBBox[4] = ymax; fAxesBBox[5] = zmax;
131 // clang-format on
134}
135
136////////////////////////////////////////////////////////////////////////////////
137/// Let the 3D axis follow the scene bounding box again.
138
144
145////////////////////////////////////////////////////////////////////////////////
146/// Cap the redraw rate of this viewer, in frames per second; 0 is uncapped.
147
149{
150 fRenderMaxHz = hz < 0.f ? 0.f : (hz > 240.f ? 240.f : hz);
152}
153
154////////////////////////////////////////////////////////////////////////////////
155/// Set the point the camera looks at and orbits around, either the world
156/// origin or the center of the scene bounding box. Clients reset their camera
157/// when this changes.
158
164
165////////////////////////////////////////////////////////////////////////////////
166/// Set the up axis, 0/1/2 for x/y/z; any other value means none.
167
169{
170 fAxesUpAxis = (a >= 0 && a <= 2) ? a : -1;
172}
173
174////////////////////////////////////////////////////////////////////////////////
175/// Enable or disable client-side extrapolation of streamed motion.
176
182
183////////////////////////////////////////////////////////////////////////////////
184/// Distance attenuation of the 3D axis labels. 0 keeps a constant pixel size
185/// and 1 scales them like geometry. The clamp is [-4, 8] because inside [0, 1]
186/// the effect is hard to see on a scene viewed from outside. Below 0 the far
187/// labels are the larger ones.
188
190{
191 fAxesAtten = a < -4.f ? -4.f : (a > 8.f ? 8.f : a);
193}
194
195////////////////////////////////////////////////////////////////////////////////
196/// Label size for the 3D axis, as a fraction of viewport height, clamped to
197/// [0.004, 0.05]. Above 0.05 the labels of a box axis start to meet.
198
200{
201 fAxesFontSize = s < 0.004f ? 0.004f : (s > 0.05f ? 0.05f : s);
203}
204
205////////////////////////////////////////////////////////////////////////////////
206/// Label size for the hover tooltip, as a fraction of viewport height. Same
207/// range as the axis labels; see SetAxesFontSize.
208
210{
211 fTooltipFontSize = s < 0.004f ? 0.004f : (s > 0.05f ? 0.05f : s);
213}
214
215////////////////////////////////////////////////////////////////////////////////
216/// Opacity of the plate behind the tooltip and kept annotations. 0 leaves the
217/// text floating on the scene, 1 hides whatever is behind it.
218
220{
221 fTooltipAlpha = a < 0.f ? 0.f : (a > 1.f ? 1.f : a);
223}
224
225////////////////////////////////////////////////////////////////////////////////
226//
232
233////////////////////////////////////////////////////////////////////////////////
234/// Multiplier on the client's light intensities, clamped at zero from below.
235
237{
238 fLightScale = s < 0.f ? 0.f : s;
240}
241
242////////////////////////////////////////////////////////////////////////////////
243/// Tone curve, as EToneMapMode.
244
250
251////////////////////////////////////////////////////////////////////////////////
252/// Knee position for kToneKnee: colours below this pass through exactly, so
253/// raising it buys fidelity and spends highlight gradient.
254
256{
257 fToneMapKnee = k < 0.f ? 0.f : (k > 0.99f ? 0.99f : k);
259}
260
261////////////////////////////////////////////////////////////////////////////////
262/// Ask the clients to pick a light scale that keeps the brightest channel just
263/// below white. Only a client can measure that, so it reports its choice back
264/// through SetLightScale().
265
271
272////////////////////////////////////////////////////////////////////////////////
273/// Stream Camera Info.
274/// Virtual from REveElement.
275int REveViewer::WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
276{
277 // fCamera.WriteCoreJson(j, rnr_offset);
278
279 j["Mandatory"] = fMandatory;
280 j["AxesType"] = fAxesType;
281 j["CameraCenter"] = fCameraCenter;
282 j["ExtrapolateMotion"] = fExtrapolateMotion;
283 j["AxesUpAxis"] = fAxesUpAxis;
284 j["RenderMaxHz"] = fRenderMaxHz;
285 // clang-format off
286 if (fHasAxesBBox)
287 j["AxesBBox"] = {fAxesBBox[0], fAxesBBox[1], fAxesBBox[2],
288 fAxesBBox[3], fAxesBBox[4], fAxesBBox[5]};
289 else
290 j["AxesBBox"] = nullptr;
291 // clang-format on
292 j["AxesAtten"] = fAxesAtten;
293 j["AxesFontSize"] = fAxesFontSize;
294 j["TooltipFontSize"] = fTooltipFontSize;
295 j["TooltipAlpha"] = fTooltipAlpha;
296 j["BlackBg"] = fBlackBackground;
297 j["LightScale"] = fLightScale;
298 j["ToneMapMode"] = fToneMapMode;
299 j["ToneMapKnee"] = fToneMapKnee;
300 j["AutoTuneSerial"] = fAutoTuneSerial;
301 j["fCameraId"] = fCamera ? fCamera->GetElementId() : 0;
302 j["fSyncCam"] = fSyncCamera;
303
304 j["UT_PostStream"] = "UT_EveViewerUpdate";
305
306 return REveElement::WriteCoreJson(j, rnr_offset);
307}
308
309////////////////////////////////////////////////////////////////////////////////
310/// Function called from MIR when user closes one of the viewer window.
311// Client id stored in thread local data
316////////////////////////////////////////////////////////////////////////////////
317/// Function called from MIR when user wants to stream unsubscribed view.
318// Client id stored in thread local data
323
324////////////////////////////////////////////////////////////////////////////////
325///
326// Set Flag if this viewer is presented on connect
328{
329 fMandatory = x;
330 for (auto &c : RefChildren()) {
331 REveSceneInfo *sinfo = dynamic_cast<REveSceneInfo *>(c);
333 }
334}
335
336////////////////////////////////////////////////////////////////////////////////
337/// Set camera reference
338
344
345////////////////////////////////////////////////////////////////////////////////
346
347REveViewerList::REveViewerList(const std::string &n, const std::string &t) :
348 REveElement (n, t),
349 fShowTooltip (kTRUE),
350
351 fBrightness(0),
352 fUseLightColorSet(kFALSE)
353{
354 // Constructor.
355
356 SetChildClass(TClass::GetClass<REveViewer>());
357 Connect();
358}
359
360////////////////////////////////////////////////////////////////////////////////
361/// Destructor.
362
367
368////////////////////////////////////////////////////////////////////////////////
369/// Call base-class implementation.
370/// If compound is open and compound of the new element is not set,
371/// the el's compound is set to this.
372
377
378////////////////////////////////////////////////////////////////////////////////
379/// Decompoundofy el, call base-class version.
380
382{
383 // This was needed as viewer was in EveWindowManager hierarchy, too.
384 // el->DecParentIgnoreCnt();
385
387}
388
389////////////////////////////////////////////////////////////////////////////////
390/// Decompoundofy children, call base-class version.
391
393{
394 // This was needed as viewer was in EveWindowManager hierarchy, too.
395 // el->DecParentIgnoreCnt();
396 // for (auto &c: fChildren)
397 // {
398 // c->DecParentIgnoreCnt();
399 // }
400
402}
403
404////////////////////////////////////////////////////////////////////////////////
405/// Connect to TGLViewer class-signals.
406
408{
409 // TQObject::Connect("TGLViewer", "MouseOver(TObject*,UInt_t)",
410 // "REveViewerList", this, "OnMouseOver(TObject*,UInt_t)");
411
412 // TQObject::Connect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
413 // "REveViewerList", this, "OnReMouseOver(TObject*,UInt_t)");
414
415 // TQObject::Connect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
416 // "REveViewerList", this, "OnUnMouseOver(TObject*,UInt_t)");
417
418 // TQObject::Connect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
419 // "REveViewerList", this, "OnClicked(TObject*,UInt_t,UInt_t)");
420
421 // TQObject::Connect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
422 // "REveViewerList", this, "OnReClicked(TObject*,UInt_t,UInt_t)");
423
424 // TQObject::Connect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
425 // "REveViewerList", this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
426}
427
428////////////////////////////////////////////////////////////////////////////////
429/// Disconnect from TGLViewer class-signals.
430
432{
433 // TQObject::Disconnect("TGLViewer", "MouseOver(TObject*,UInt_t)",
434 // this, "OnMouseOver(TObject*,UInt_t)");
435
436 // TQObject::Disconnect("TGLViewer", "ReMouseOver(TObject*,UInt_t)",
437 // this, "OnReMouseOver(TObject*,UInt_t)");
438
439 // TQObject::Disconnect("TGLViewer", "UnMouseOver(TObject*,UInt_t)",
440 // this, "OnUnMouseOver(TObject*,UInt_t)");
441
442 // TQObject::Disconnect("TGLViewer", "Clicked(TObject*,UInt_t,UInt_t)",
443 // this, "OnClicked(TObject*,UInt_t,UInt_t)");
444
445 // TQObject::Disconnect("TGLViewer", "ReClicked(TObject*,UInt_t,UInt_t)",
446 // this, "OnReClicked(TObject*,UInt_t,UInt_t)");
447
448 // TQObject::Disconnect("TGLViewer", "UnClicked(TObject*,UInt_t,UInt_t)",
449 // this, "OnUnClicked(TObject*,UInt_t,UInt_t)");
450}
451
452////////////////////////////////////////////////////////////////////////////////
453/// Repaint viewers that are tagged as changed.
454
455void REveViewerList::RepaintChangedViewers(Bool_t /*resetCameras*/, Bool_t /*dropLogicals*/)
456{
457 //for (auto &c: fChildren) {
458 // TGLViewer* glv = ((REveViewer*)c)->GetGLViewer();
459 // if (glv->IsChanged())
460 // {
461 // if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
462 // if (dropLogicals) glv->SetSmartRefresh(kFALSE);
463
464 // glv->RequestDraw(TGLRnrCtx::kLODHigh);
465
466 // if (dropLogicals) glv->SetSmartRefresh(kTRUE);
467 // }
468 //}
469}
470
471////////////////////////////////////////////////////////////////////////////////
472/// Repaint all viewers.
473
474void REveViewerList::RepaintAllViewers(Bool_t /*resetCameras*/, Bool_t /*dropLogicals*/)
475{
476 // for (auto &c: fChildren) {
477 // TGLViewer* glv = ((REveViewer *)c)->GetGLViewer();
478
479 // if (resetCameras) glv->PostSceneBuildSetup(kTRUE);
480 // if (dropLogicals) glv->SetSmartRefresh(kFALSE);
481
482 // glv->RequestDraw(TGLRnrCtx::kLODHigh);
483
484 // if (dropLogicals) glv->SetSmartRefresh(kTRUE);
485 // }
486}
487
488////////////////////////////////////////////////////////////////////////////////
489/// Delete annotations from all viewers.
490
492{
493 // for (auto &c: fChildren) {
494 // TGLViewer* glv = ((REveViewer *)c)->GetGLViewer();
495 // glv->DeleteOverlayAnnotations();
496 // }
497}
498
499////////////////////////////////////////////////////////////////////////////////
500/// Callback done from a REveScene destructor allowing proper
501/// removal of the scene from affected viewers.
502
504{
505 for (auto &viewer: fChildren) {
506 for (auto &j: viewer->RefChildren()) {
507 REveSceneInfo* sinfo = (REveSceneInfo *) j;
508 if (sinfo->GetScene() == scene)
509 viewer->RemoveElement(sinfo);
510 }
511 }
512}
513
514////////////////////////////////////////////////////////////////////////////////
515/// Set color brightness.
516
521
522////////////////////////////////////////////////////////////////////////////////
523/// Switch background color.
524
526{
528 // To implement something along the lines of:
529 // BeginChanges on EveWorld; // Here or in the calling function
530 // for (auto &c: fChildren) {
531 // REveViewer* v = (REveViewer *)c;
532 // if ( fUseLightColorSet)
533 // c->UseLightColorSet();
534 // else
535 // c->UseDarkColorSet();
536 // }
537 // EndChanges on EveWorld;
538}
539
541{
542 auto element = gEve->FindElementById(cameraId);
543 auto cam = dynamic_cast<REveCamera *>(element);
544
545 if (cam) {
546 fCamera = cam;
548 }
549}
550
551////////////////////////////////////////////////////////////////////////////////
552/// Set camera by type (backward compatibility with old API)
553
555{
556 for (auto &cam : fCameraList) {
557 if (cam->GetType() == type) {
558 fCamera = cam;
559 }
560 }
561
563 fCameraList.push_back(fCamera);
565}
566
567////////////////////////////////////////////////////////////////////////////////
568// Create Camera Based on Type Enum (Lines 161-190)
570{
571 REveCamera *cam = nullptr;
572
573 struct CameraDef {
575 const char *name;
578 };
579
580 static const CameraDef predefinedCameras[] = {
581 // Perspective cameras
582 {REveCamera::kCameraPerspXOZ, "PerspXOZ", REveVector(-1.0, 0.0, 0.0), REveVector(0.0, 1.0, 0.0)},
583 {REveCamera::kCameraPerspYOZ, "PerspYOZ", REveVector(0.0, -1.0, 0.0), REveVector(1.0, 0.0, 0.0)},
584 {REveCamera::kCameraPerspXOY, "PerspXOY", REveVector(-1.0, 0.0, 0.0), REveVector(0.0, 0.0, 1.0)},
585 // Orthographic cameras
586 {REveCamera::kCameraOrthoXOY, "OrthoXOY", REveVector(0.0, 0.0, 1.0), REveVector(0.0, 1.0, 0.0)},
587 {REveCamera::kCameraOrthoXOZ, "OrthoXOZ", REveVector(0.0, -1.0, 0.0), REveVector(0.0, 0.0, 1.0)},
588 {REveCamera::kCameraOrthoZOY, "OrthoZOY", REveVector(-1.0, 0.0, 0.0), REveVector(0.0, 1.0, 0.0)},
589 {REveCamera::kCameraOrthoZOX, "OrthoZOX", REveVector(0.0, -1.0, 0.0), REveVector(1.0, 0.0, 0.0)},
590 // Orthographic negative camera
591 {REveCamera::kCameraOrthoXnOY, "OrthoXnOY", REveVector(0.0, 0.0, -1.0), REveVector(0.0, 1.0, 0.0)},
592 {REveCamera::kCameraOrthoXnOZ, "OrthoXnOZ", REveVector(0.0, 1.0, 0.0), REveVector(0.0, 0.0, 1.0)},
593 {REveCamera::kCameraOrthoZnOY, "OrthoZnOY", REveVector(1.0, 0.0, 0.0), REveVector(0.0, 1.0, 0.0)},
594 {REveCamera::kCameraOrthoZnOX, "OrthoZnOX", REveVector(0.0, 1.0, 0.0), REveVector(1.0, 0.0, 0.0)}};
595
596 // Create and add all predefined cameras
597 for (const auto &camDef : predefinedCameras) {
598 if (type == camDef.type) {
599 cam = new REveCamera(camDef.name);
600 gEve->GetCameras()->AddElement(cam);
601 cam->Setup(camDef.type, camDef.name, camDef.v1, camDef.v2);
602 }
603 }
604
605 return cam;
606}
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
constexpr Bool_t kTRUE
Definition RtypesCore.h:108
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
Definition TGX11.cxx:142
float xmin
float ymin
float xmax
float ymax
void Setup(ECameraType type, const std::string &name, const REveVector &v1, const REveVector &v2)
Setup camera with type, name, direction and up vectors.
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
virtual void AddElement(REveElement *el)
Add el to the list of children.
virtual void RemoveElementLocal(REveElement *el)
Perform additional local removal of el.
ElementId_t GetElementId() const
virtual void RemoveElement(REveElement *el)
Remove el from the list of children.
REveException Exception-type thrown by Eve classes.
Definition REveTypes.hxx:42
void DisconnectEveViewer(REveViewer *)
REveElement * FindElementById(ElementId_t id) const
Lookup ElementId in element map and return corresponding REveElement*.
void ConnectEveViewer(REveViewer *)
REveElement * GetCameras() const
REveSceneInfo Scene in a viewer.
static void SetColorBrightness(Float_t value, Bool_t full_redraw=kFALSE)
Tweak all ROOT colors to become brighter (if value > 0) or darker (value < 0).
Definition REveUtil.cxx:240
void RemoveElementsLocal() override
Decompoundofy children, call base-class version.
void AddElement(REveElement *el) override
Call base-class implementation.
~REveViewerList() override
Destructor.
void SceneDestructing(REveScene *scene)
Callback done from a REveScene destructor allowing proper removal of the scene from affected viewers.
void SetColorBrightness(Float_t b)
Set color brightness.
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
void SwitchColorSet()
Switch background color.
REveViewerList(const REveViewerList &)=delete
virtual void Connect()
Connect to TGLViewer class-signals.
void DeleteAnnotations()
Delete annotations from all viewers.
void RemoveElementLocal(REveElement *el) override
Decompoundofy el, call base-class version.
void SetCameraCenter(ECameraCenter c)
Set the point the camera looks at and orbits around, either the world origin or the center of the sce...
void RemoveElementLocal(REveElement *el) override
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
void DisconnectClient()
Function called from MIR when user closes one of the viewer window.
void ConnectClient()
Function called from MIR when user wants to stream unsubscribed view.
Bool_t fExtrapolateMotion
Let the client extrapolate streamed motion between updates.
~REveViewer() override
Destructor.
void SetCamera(ROOT::Experimental::REveCamera *cam)
Set camera reference.
std::vector< REveCamera * > fCameraList
void RemoveElementsLocal() override
Remove all children, forwarded to GLViewer.
Float_t fAxesAtten
Distance attenuation of the 3D axis labels; see SetAxesAtten().
void ClearAxesBBox()
Let the 3D axis follow the scene bounding box again.
void SetRenderMaxHz(Float_t)
Cap the redraw rate of this viewer, in frames per second; 0 is uncapped.
void SetCameraType(REveCamera::ECameraType type)
Set camera by type (backward compatibility with old API)
void SetTooltipAlpha(Float_t a)
Opacity of the plate behind the tooltip and kept annotations.
Float_t fAxesBBox[6]
xmin, ymin, zmin, xmax, ymax, zmax
Float_t fLightScale
Multiplier on the client's light intensities; see SetLightScale().
Float_t fRenderMaxHz
see SetRenderMaxHz(); 0 is uncapped
void SetAxesFontSize(Float_t s)
Label size for the 3D axis, as a fraction of viewport height, clamped to [0.004, 0....
void SetExtrapolateMotion(bool)
Enable or disable client-side extrapolation of streamed motion.
Float_t fTooltipFontSize
Tooltip text size, same units as fAxesFontSize.
Int_t fAutoTuneSerial
Bumped by AutoTuneLights(); the client re-measures when it changes.
void AutoTuneLights()
Ask the clients to pick a light scale that keeps the brightest channel just below white.
void SetAxesBBox(Float_t xmin, Float_t ymin, Float_t zmin, Float_t xmax, Float_t ymax, Float_t zmax)
Fix the volume the 3D axis spans, as {min, max} per coordinate, instead of following the scene conten...
Bool_t fHasAxesBBox
see SetAxesBBox()
ECameraCenter
Point the camera looks at and orbits around after a camera reset.
Int_t fAxesUpAxis
Which axis points up: 0/1/2 for x/y/z, -1 (default) for none.
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Stream Camera Info.
void SetCameraByElementId(ElementId_t cameraId)
Float_t fTooltipAlpha
Opacity of the plate behind the tooltip and kept annotations, in [0, 1].
void SetAxesAtten(Float_t a)
Distance attenuation of the 3D axis labels.
void SetLightScale(Float_t s)
Multiplier on the client's light intensities, clamped at zero from below.
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
virtual void AddScene(REveScene *scene)
Add 'scene' to the list of scenes.
void SetTooltipFontSize(Float_t s)
Label size for the hover tooltip, as a fraction of viewport height.
ROOT::Experimental::REveCamera * CreateCamera(ECameraType type)
void SetToneMapKnee(Float_t k)
Knee position for kToneKnee: colours below this pass through exactly, so raising it buys fidelity and...
Float_t fAxesFontSize
3D axis label size, as a fraction of viewport height.
void SetAxesUpAxis(int)
Set the up axis, 0/1/2 for x/y/z; any other value means none.
void SetToneMapMode(Int_t m)
Tone curve, as EToneMapMode.
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
Definition TROOT.cxx:3406
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Namespace for ROOT features in testing.
Definition TROOT.h:100
R__EXTERN REveManager * gEve
REveVectorT< Float_t > REveVector
TMarker m
Definition textangle.C:8