24using namespace std::string_literals;
30 std::unique_ptr<Browsable::RHolder>
fObject;
41 TGeoVolume *top = mgr->MakeBox(
"TOP",med,100,100,100);
42 mgr->SetTopVolume(top);
43 TGeoVolume *vol = mgr->MakeBox(
"BOX",med, 20,30,40);
58 fViewer.SetShowHierarchy(
false);
63 std::string
GetKind()
const override {
return "geom"s; }
67 bool DrawElement(std::shared_ptr<Browsable::RElement> &elem,
const std::string & =
"")
override
79 auto mgr = vol->GetGeoManager();
81 if (!mgr || (mgr->GetListOfVolumes()->GetLast() < 0) || (mgr->GetVolume(vol->GetName()) != vol))
84 fViewer.SetGeometry(vol->GetGeoManager(), vol->GetName());
91 fViewer.SetGeometry(node->GetVolume()->GetGeoManager(), node->GetVolume()->GetName());
113 std::shared_ptr<RBrowserWidget>
Create(
const std::string &
name)
final
115 return std::make_shared<RBrowserGeomWidget>(
name);
externTGeoManager * gGeoManager
std::shared_ptr< RBrowserWidget > Create(const std::string &name) final
~RBrowserGeomProvider() override=default
@ kActGeom
can be shown in geometry viewer
Web-based ROOT geometry viewer.
The manager class for any TGeo geometry.
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void SetLineWidth(Width_t lwidth) override
Set the line width.
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
void SetLineColor(Color_t lcolor) override
Set the line color.