Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveGeoPainter.cxx
Go to the documentation of this file.
1// @(#)root/eve7:$Id$
2// Author: Sergey Linev, 27.02.2020
3
4/*************************************************************************
5 * Copyright (C) 1995-2020, 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
14#include "TGeoVolume.h"
15
16using namespace ROOT::Experimental;
17
19{
21 fGeoManager = manager;
22}
23
25{
26}
27
29{
30 if (fViewer && (fGeoManager!=mgr))
31 fViewer->SetGeometry(fGeoManager);
32
33 fGeoManager = mgr;
34}
35
37{
38 if (!fViewer)
39 fViewer = std::make_shared<REveGeomViewer>(fGeoManager);
40
41 // select volume to draw
42 fViewer->SetGeometry(fGeoManager, vol->GetName());
43
44 std::string drawopt = "";
45 if (opt && strstr(opt,"s"))
46 drawopt = "wire";
47
48 // specify JSROOT draw options - here clipping on X,Y,Z axes
49 fViewer->SetDrawOptions(drawopt);
50
51 // set default limits for number of visible nodes and faces
52 // when viewer created, initial values exported from TGeoManager
53 // viewer->SetLimits();
54
55 // start browser
56 fViewer->Show();
57}
const char Option_t
Definition RtypesCore.h:66
std::shared_ptr< REveGeomViewer > fViewer
void DrawVolume(TGeoVolume *, Option_t *="") override
void SetGeoManager(TGeoManager *) override
The manager class for any TGeo geometry.
Definition TGeoManager.h:45
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Abstract class for geometry painters.
static void SetPainter(const TVirtualGeoPainter *painter)
Static function to set an alternative histogram painter.