14#include <ROOT/RBrowserRequest.hxx>
15#include <ROOT/RBrowserReply.hxx>
36using namespace std::string_literals;
42namespace Experimental {
45class RGeomBrowserIter {
47 REveGeomDescription &fDesc;
52 std::vector<int> fStackParents;
53 std::vector<int> fStackChilds;
57 RGeomBrowserIter(REveGeomDescription &desc) : fDesc(desc) {}
59 const std::string &GetName()
const {
return fDesc.fDesc[fNodeId].name; }
61 bool IsValid()
const {
return fNodeId >= 0; }
63 int GetNodeId()
const {
return fNodeId; }
65 bool HasChilds()
const {
return (fNodeId < 0) ? true : fDesc.fDesc[fNodeId].chlds.size() > 0; }
67 int NumChilds()
const {
return (fNodeId < 0) ? 1 : fDesc.fDesc[fNodeId].chlds.size(); }
77 auto &node = fDesc.fDesc[fNodeId];
78 if (node.chlds.size() == 0)
return false;
79 fStackParents.emplace_back(fParentId);
80 fStackChilds.emplace_back(fChild);
83 fNodeId = node.chlds[fChild];
89 if (fStackParents.size() == 0) {
93 fParentId = fStackParents.back();
94 fChild = fStackChilds.back();
96 fStackParents.pop_back();
97 fStackChilds.pop_back();
102 fNodeId = fDesc.fDesc[fParentId].chlds[fChild];
110 if ((fNodeId <= 0) || (fParentId < 0)) {
115 auto &prnt = fDesc.fDesc[fParentId];
116 if (++fChild >= prnt.chlds.size()) {
121 fNodeId = prnt.chlds[fChild];
130 fStackParents.clear();
131 fStackChilds.clear();
138 if (Enter())
return true;
140 if (Next())
return true;
143 if (Next())
return true;
151 bool Navigate(
const std::string &path)
153 size_t pos = path.find(
"/");
154 if (pos != 0)
return false;
158 while (++pos < path.length()) {
161 pos = path.find(
"/", last);
163 if (pos == std::string::npos) pos = path.length();
165 std::string folder = path.substr(last, pos-last);
167 if (!Enter())
return false;
172 find = (folder.compare(GetName()) == 0);
173 }
while (!find && Next());
175 if (!find)
return false;
182 std::vector<int> CurrentIds()
const
184 std::vector<int> res;
186 for (
unsigned n=1;
n<fStackParents.size();++
n)
187 res.emplace_back(fStackParents[
n]);
188 if (fParentId >= 0) res.emplace_back(fParentId);
189 res.emplace_back(fNodeId);
223 if (!is_translate && !is_scale && !is_rotate) {
226 auto test = [](
double val,
double chk) {
return (val==chk) || (
TMath::Abs(val-chk) < 1
e-20); };
228 bool no_scale =
test(scale[0],1) &&
test(scale[1],1) &&
test(scale[2],1);
229 bool no_trans =
test(trans[0],0) &&
test(trans[1],0) &&
test(trans[2],0);
230 bool no_rotate =
test(rotate[0],1) &&
test(rotate[1],0) &&
test(rotate[2],0) &&
231 test(rotate[3],0) &&
test(rotate[4],1) &&
test(rotate[5],0) &&
232 test(rotate[6],0) &&
test(rotate[7],0) &&
test(rotate[8],1);
234 if (no_scale && no_trans && no_rotate)
237 if (no_scale && no_trans && !no_rotate) {
239 }
else if (no_scale && !no_trans && no_rotate) {
241 }
else if (!no_scale && no_trans && no_rotate) {
265 for (
int n=0;
n<9;++
n)
271 vect[0] = rotate[0]; vect[4] = rotate[1]; vect[8] = rotate[2]; vect[12] = trans[0];
272 vect[1] = rotate[3]; vect[5] = rotate[4]; vect[9] = rotate[5]; vect[13] = trans[1];
273 vect[2] = rotate[6]; vect[6] = rotate[7]; vect[10] = rotate[8]; vect[14] = trans[2];
274 vect[3] = 0; vect[7] = 0; vect[11] = 0; vect[15] = 1;
292 if (!volname.empty()) {
293 auto vol = mgr->
GetVolume(volname.c_str());
297 while ((node=next())) {
300 if (node) { topnode = node; printf(
"Find node with volume\n"); }
312 SetMaxVisNodes(maxnodes);
313 SetMaxVisFaces( (maxnodes > 5000 ? 5000 : (maxnodes < 1000 ? 1000 : maxnodes)) * 100);
316 std::vector<int> numbers;
317 int offset = 1000000000;
327 numbers.emplace_back(snode->
GetNumber());
328 snode->
SetNumber(offset + fNodes.size());
329 fNodes.emplace_back(snode);
331 }
while ((snode = iter()) !=
nullptr);
333 fDesc.reserve(fNodes.size());
334 numbers.reserve(fNodes.size());
335 fSortMap.reserve(fNodes.size());
338 std::vector<REveGeomNode *> sortarr;
339 sortarr.reserve(fNodes.size());
343 for (
auto &node: fNodes) {
345 fDesc.emplace_back(node->GetNumber() - offset);
346 auto &desc = fDesc[
cnt++];
348 sortarr.emplace_back(&desc);
350 desc.name = node->GetName();
352 auto shape =
dynamic_cast<TGeoBBox *
>(node->GetVolume()->GetShape());
354 desc.vol = shape->
GetDX()*shape->GetDY()*shape->GetDZ();
358 CopyMaterialProperties(node->GetVolume(), desc);
360 auto chlds = node->GetNodes();
362 PackMatrix(desc.matr, node->GetMatrix());
365 for (
int n = 0;
n <= chlds->GetLast(); ++
n) {
366 auto chld =
dynamic_cast<TGeoNode *
> (chlds->At(
n));
367 desc.chlds.emplace_back(chld->GetNumber()-offset);
373 for (
auto &node: fNodes)
374 node->SetNumber(numbers[
cnt++]);
380 for (
auto &elem: sortarr) {
381 fSortMap.emplace_back(elem->id);
382 elem->sortid =
cnt++;
395 int res = 0,
cnt = 0;
396 for (
auto &node: fNodes) {
397 auto &desc = fDesc[
cnt++];
399 desc.nochlds =
false;
402 if (node->IsOnScreen())
405 auto vol = node->GetVolume();
410 if (!node->IsVisDaughters())
413 if ((desc.vis > 0) && (desc.chlds.size() > 0) && !desc.nochlds)
417 if (desc.IsVisible() && desc.CanDisplay()) res++;
428 for (
auto &node : fDesc)
434 if (node.idshift < 0) {
436 for(
auto id : node.chlds)
437 node.idshift += scan_func(fDesc[
id]);
440 return node.idshift + 1;
443 if (fDesc.size() > 0)
452 std::vector<int> stack;
458 ScanFunc_t scan_func = [&,
this](
int nodeid,
int lvl) {
459 auto &desc = fDesc[nodeid];
462 if (desc.nochlds && (lvl > 0)) lvl = 0;
465 bool is_visible = (lvl >= 0) && (desc.vis > lvl) && desc.CanDisplay();
467 if (is_visible || !only_visible)
468 if (func(desc, stack, is_visible, counter))
473 if ((desc.chlds.size() > 0) && ((lvl > 0) || !only_visible)) {
474 auto pos = stack.size();
475 stack.emplace_back(0);
476 for (
unsigned k = 0; k < desc.chlds.size(); ++k) {
478 res += scan_func(desc.chlds[k], lvl - 1);
482 counter += desc.idshift;
488 if (!maxlvl && (GetVisLevel() > 0)) maxlvl = GetVisLevel();
489 if (!maxlvl) maxlvl = 4;
490 if (maxlvl > 97) maxlvl = 97;
492 return scan_func(0, maxlvl);
501 for (
auto &node : fDesc)
502 node.useflag =
false;
508 for (
auto &item : drawing.
visibles) {
510 for (
auto &chindx : item.stack) {
511 auto &node = fDesc[nodeid];
514 drawing.
nodes.emplace_back(&node);
516 if (chindx >= (
int)node.chlds.size())
518 nodeid = node.chlds[chindx];
521 auto &node = fDesc[nodeid];
524 drawing.
nodes.emplace_back(&node);
528 printf(
"SELECT NODES %d\n", (
int) drawing.
nodes.size());
539 auto request = TBufferJSON::FromJSON<RBrowserRequest>(msg);
542 request = std::make_unique<RBrowserRequest>();
545 request->number = 100;
551 if ((request->path.compare(
"/") == 0) && (request->first == 0) && (GetNumNodes() < (IsPreferredOffline() ? 1000000 : 1000))) {
553 std::vector<REveGeomNodeBase *> vect(fDesc.size(),
nullptr);
556 for (
auto &item : fDesc)
562 RGeomBrowserIter iter(*
this);
564 while (iter.NextNode())
566 printf(
"Total number of valid nodes %d\n", nelements);
569 std::vector<Browsable::RItem> temp_nodes;
570 bool toplevel = (request->path.compare(
"/") == 0);
574 reply.path = request->path;
575 reply.first = request->first;
577 RGeomBrowserIter iter(*
this);
578 if (iter.Navigate(request->path)) {
580 reply.nchilds = iter.NumChilds();
584 while ((request->first > 0) && iter.Next()) {
588 while (iter.IsValid() && (request->number > 0)) {
589 temp_nodes.emplace_back(iter.GetName(), iter.NumChilds());
590 if (toplevel) temp_nodes.back().SetExpanded(
true);
592 if (!iter.Next())
break;
597 for (
auto &
n : temp_nodes)
598 reply.nodes.emplace_back(&
n);
612 for (
auto &descr : fShapes)
613 if (descr.fShape == shape)
616 fShapes.emplace_back(shape);
617 auto &elem = fShapes.back();
618 elem.
id = fShapes.size() - 1;
628 auto &elem = FindShapeDescr(shape);
630 if (elem.nfaces == 0) {
644 if (IsBuildShapes() < boundary) {
646 elem.fShapeInfo.shape = shape;
649 auto poly = std::make_unique<REveGeoPolyShape>();
652 poly->BuildFromComposite(comp, GetNSegments());
654 poly->BuildFromShape(shape, GetNSegments());
659 poly->FillRenderData(rd);
661 elem.nfaces = poly->GetNumFaces();
664 rd.
Write(
reinterpret_cast<char *
>(elem.fRawInfo.raw.data()), elem.fRawInfo.raw.size() );
665 elem.fRawInfo.sz[0] = rd.
SizeV();
666 elem.fRawInfo.sz[1] = rd.
SizeN();
667 elem.fRawInfo.sz[2] = rd.
SizeI();
693 if ((fillstyle>=3000) && (fillstyle<=3100)) node.
opacity = (3100 - fillstyle) / 100.;
694 if (!col) col =
gROOT->GetColor(material->GetFillColor());
698 node.
color = std::to_string((
int)(col->GetRed()*255)) +
"," +
699 std::to_string((
int)(col->GetGreen()*255)) +
"," +
700 std::to_string((
int)(col->GetBlue()*255));
702 node.
opacity = col->GetAlpha();
713 for (
auto &
s: fShapes)
723 std::vector<int> viscnt(fDesc.size(), 0);
725 int level = GetVisLevel();
728 int numnodes = ScanNodes(
true, level, [&viscnt](
REveGeomNode &node, std::vector<int> &,
bool,
int) {
733 if (GetMaxVisNodes() > 0) {
734 while ((numnodes > GetMaxVisNodes()) && (level > 1)) {
736 viscnt.assign(viscnt.size(), 0);
737 numnodes = ScanNodes(
true, level, [&viscnt](
REveGeomNode &node, std::vector<int> &,
bool,
int) {
744 fActualLevel = level;
747 int totalnumfaces{0}, totalnumnodes{0};
753 for (
auto &sid: fSortMap) {
755 auto &desc = fDesc[sid];
757 if ((viscnt[sid] <= 0) || (desc.vol <= 0))
continue;
759 auto shape = fNodes[sid]->GetVolume()->GetShape();
760 if (!shape)
continue;
763 auto &shape_descr = MakeShapeDescr(shape);
766 if (shape_descr.nfaces <= 0) {
767 R__ERROR_HERE(
"webeve") <<
"No faces for the shape " << shape->GetName() <<
" class " << shape->ClassName();
772 totalnumfaces += shape_descr.nfaces * viscnt[sid];
773 if ((GetMaxVisFaces() > 0) && (totalnumfaces > GetMaxVisFaces()))
break;
776 totalnumnodes += viscnt[sid];
777 if ((GetMaxVisNodes() > 0) && (totalnumnodes > GetMaxVisNodes()))
break;
787 bool has_shape =
false;
789 ScanNodes(
true, level, [&,
this](
REveGeomNode &node, std::vector<int> &stack,
bool,
int seqid) {
790 if (node.
sortid < fDrawIdCut) {
791 drawing.visibles.emplace_back(node.id, seqid, stack);
793 auto &item = drawing.visibles.back();
794 item.color = node.color;
795 item.opacity = node.opacity;
797 auto volume = fNodes[node.id]->GetVolume();
799 auto &sd = MakeShapeDescr(volume->GetShape());
801 item.ri = sd.rndr_info();
802 if (sd.has_shape()) has_shape = true;
807 CollectNodes(drawing);
809 fDrawJson =
"GDRAW:"s + MakeDrawingJson(drawing, has_shape);
828 if ((nodeid < 0) || (nodeid >= (
int)fDesc.size()))
831 auto &desc = fDesc[nodeid];
833 return (desc.sortid < fDrawIdCut) && desc.IsVisible() && desc.CanDisplay() && (desc.chlds.size()==0);
848 hjson =
"FOUND:RESET";
852 std::vector<int> nodescnt(fDesc.size(), 0), viscnt(fDesc.size(), 0);
857 return (node.vol > 0) && (node.name.compare(0, find.length(), find) == 0);
861 ScanNodes(
false, 0, [&nodescnt,&viscnt,&match_func,&nmatches](
REveGeomNode &node, std::vector<int> &,
bool is_vis,
int) {
863 if (match_func(node)) {
866 if (is_vis) viscnt[node.
id]++;
877 if (nmatches > 10 * GetMaxVisNodes()) {
878 hjson =
"FOUND:Too many " + std::to_string(nmatches);
884 int totalnumfaces{0}, totalnumnodes{0}, scnt{0};
885 bool send_rawdata{
true};
888 for (
auto &sid: fSortMap) {
889 if (scnt++ < fDrawIdCut)
continue;
891 if (viscnt[sid] == 0)
continue;
893 auto &desc = fDesc[sid];
894 if ((viscnt[sid] <= 0) && (desc.vol <= 0))
continue;
896 auto shape = fNodes[sid]->GetVolume()->GetShape();
897 if (!shape)
continue;
900 auto &shape_descr = MakeShapeDescr(shape);
903 if (shape_descr.nfaces <= 0) {
904 R__ERROR_HERE(
"webeve") <<
"No faces for the shape " << shape->GetName() <<
" class " << shape->ClassName();
909 totalnumfaces += shape_descr.nfaces * viscnt[sid];
910 if ((GetMaxVisFaces() > 0) && (totalnumfaces > GetMaxVisFaces())) { send_rawdata =
false;
break; }
913 totalnumnodes += viscnt[sid];
914 if ((GetMaxVisNodes() > 0) && (totalnumnodes > GetMaxVisNodes())) { send_rawdata =
false;
break; }
924 std::vector<REveGeomNodeBase> found_desc;
925 std::vector<int> found_map(fDesc.size(), -1);
929 found_desc.emplace_back(0);
930 found_desc[0].vis = fDesc[0].vis;
931 found_desc[0].name = fDesc[0].name;
932 found_desc[0].color = fDesc[0].color;
938 bool has_shape =
true;
940 ScanNodes(
false, 0, [&,
this](
REveGeomNode &node, std::vector<int> &stack,
bool is_vis,
int seqid) {
942 if (!match_func(node))
947 for (
auto &
s : stack) {
948 int chldid = fDesc[prntid].chlds[
s];
949 if (found_map[chldid] <= 0) {
950 int newid = found_desc.size();
951 found_desc.emplace_back(newid);
952 found_map[chldid] = newid;
954 found_desc.back().vis = fDesc[chldid].vis;
955 found_desc.back().
name = fDesc[chldid].
name;
956 found_desc.back().color = fDesc[chldid].color;
959 auto pid = found_map[prntid];
960 auto cid = found_map[chldid];
963 auto &pchlds = found_desc[pid].chlds;
964 if (std::find(pchlds.begin(), pchlds.end(), cid) == pchlds.end())
965 pchlds.emplace_back(cid);
971 if (!is_vis)
return true;
973 drawing.
visibles.emplace_back(node.
id, seqid, stack);
977 if (!send_rawdata || (node.
sortid < fDrawIdCut)) {
982 auto &item = drawing.
visibles.back();
983 auto volume = fNodes[node.
id]->GetVolume();
985 item.color = node.
color;
988 auto &sd = MakeShapeDescr(volume->GetShape());
990 item.ri = sd.rndr_info();
991 if (sd.has_shape()) has_shape =
true;
997 CollectNodes(drawing);
999 json =
"FDRAW:"s + MakeDrawingJson(drawing, has_shape);
1011 for (
auto &chindx: stack) {
1012 auto &node = fDesc[nodeid];
1013 if (chindx >= (
int) node.chlds.size())
return -1;
1014 nodeid = node.chlds[chindx];
1025 std::vector<int> stack;
1028 printf(
"Wrong first id\n");
1034 for (
unsigned k = 1; k < ids.size(); ++k) {
1036 int prntid = nodeid;
1039 if (nodeid >= (
int) fDesc.size()) {
1040 printf(
"Wrong node id %d\n", nodeid);
1044 auto &chlds = fDesc[prntid].chlds;
1045 auto pos = std::find(chlds.begin(), chlds.end(), nodeid);
1046 if (pos == chlds.end()) {
1047 printf(
"Wrong id %d not a child of %d - fail to find stack num %d\n", nodeid, prntid, (
int) chlds.size());
1052 stack.emplace_back(std::distance(chlds.begin(), pos));
1064 std::vector<int> res;
1066 RGeomBrowserIter iter(*
this);
1068 if (iter.Navigate(path)) {
1074 res = MakeStackByIds(iter.CurrentIds());
1086 std::vector<int> ids;
1088 ids.emplace_back(0);
1090 bool failure =
false;
1092 for (
auto s : stack) {
1093 auto &chlds = fDesc[nodeid].chlds;
1094 if (
s >= (
int) chlds.size()) { failure =
true;
break; }
1096 ids.emplace_back(chlds[
s]);
1102 printf(
"Fail to convert stack into list of nodes\n");
1116 auto ids = MakeIdsByStack(stack);
1117 if (ids.size() > 0) {
1119 for (
auto &
id : ids) {
1120 path.append(fDesc[
id].
name);
1135 std::vector<REveGeomNodeBase *> nodes;
1136 auto vol = fNodes[nodeid]->GetVolume();
1142 for (
auto &desc : fDesc)
1143 if (fNodes[
id++]->GetVolume() == vol)
1144 nodes.emplace_back(&desc);
1159 TGeoVolume *vol = (nodeid < 0) ?
nullptr : fNodes[nodeid]->GetVolume();
1168 ScanNodes(
true, 0, [&,
this](
REveGeomNode &node, std::vector<int> &stack,
bool,
int seq_id) {
1172 if (fNodes[node.
id]->GetVolume() != vol)
return true;
1174 if (node.
id != nodeid)
return true;
1177 drawing.
visibles.emplace_back(node.
id, seq_id, stack);
1179 auto &item = drawing.
visibles.back();
1181 item.color = node.
color;
1194 bool has_shape =
false, has_raw =
false;
1196 auto &sd = MakeShapeDescr(vol->
GetShape());
1199 for (
auto &item : drawing.
visibles) {
1200 item.ri = sd.rndr_info();
1201 if (sd.has_shape()) has_shape =
true;
1202 if (sd.has_raw()) has_raw =
true;
1205 CollectNodes(drawing);
1207 json.append(MakeDrawingJson(drawing, has_shape));
1209 return has_raw || has_shape;
1220 int comp = GetJsonComp();
1228 json.SetCompact(comp);
1229 json.SetSkipClassInfo(TClass::GetClass<REveGeomDrawing>());
1230 json.SetSkipClassInfo(TClass::GetClass<REveGeomNode>());
1231 json.SetSkipClassInfo(TClass::GetClass<REveGeomVisible>());
1232 json.SetSkipClassInfo(TClass::GetClass<RGeomShapeRenderInfo>());
1233 json.SetSkipClassInfo(TClass::GetClass<RGeomRawRenderInfo>());
1235 return json.StoreObject(&drawing, TClass::GetClass<REveGeomDrawing>()).Data();
1244 auto &dnode = fDesc[nodeid];
1246 auto vol = fNodes[nodeid]->GetVolume();
1249 if (vol->IsVisible() == selected)
1252 dnode.vis = selected ? 99 : 0;
1253 vol->SetVisibility(selected);
1254 if (dnode.chlds.size() > 0) {
1255 if (selected) dnode.vis = 1;
1256 vol->SetVisDaughters(selected);
1260 for (
auto &desc: fDesc)
1261 if (fNodes[
id++]->GetVolume() == vol)
1262 desc.vis = dnode.vis;
1275 std::unique_ptr<REveGeomNodeInfo> res;
1277 RGeomBrowserIter iter(*
this);
1279 if (iter.Navigate(path)) {
1281 auto node = fNodes[iter.GetNodeId()];
1283 auto &desc = fDesc[iter.GetNodeId()];
1285 res = std::make_unique<REveGeomNodeInfo>();
1287 res->fullpath = path;
1288 res->node_name = node->GetName();
1289 res->node_type = node->ClassName();
1291 TGeoShape *shape = node->GetVolume() ? node->GetVolume()->GetShape() :
nullptr;
1294 res->shape_name = shape->
GetName();
1298 if (shape && desc.CanDisplay()) {
1300 auto &shape_descr = MakeShapeDescr(shape);
1302 res->ri = shape_descr.rndr_info();
1315 auto cfg = TBufferJSON::FromJSON<REveGeomConfig>(
json);
1316 if (!cfg)
return false;
#define R__ERROR_HERE(GROUP)
void CollectNodes(REveGeomDrawing &drawing)
Collect nodes which are used in visibles.
std::vector< int > MakeStackByIds(const std::vector< int > &ids)
Creates stack for given array of ids, first element always should be 0.
ShapeDescr & MakeShapeDescr(TGeoShape *shape)
Find description object and create render information.
bool ProduceDrawingFor(int nodeid, std::string &json, bool check_volume=false)
Produce shape rendering data for given stack All nodes, which are referencing same shape will be tran...
std::string ProduceModifyReply(int nodeid)
Return string with only part of nodes description which were modified Checks also volume.
int SearchVisibles(const std::string &find, std::string &hjson, std::string &json)
Search visible nodes for provided name If number of found elements less than 100, create description ...
bool CollectVisibles()
Collect all information required to draw geometry on the client This includes list of each visible no...
void Build(TGeoManager *mgr, const std::string &volname="")
Collect information about geometry hierarchy into flat list like it done JSROOT.GEO....
bool ChangeConfiguration(const std::string &json)
Change configuration by client Returns true if any parameter was really changed.
int ScanNodes(bool only_visible, int maxlvl, REveGeomScanFunc_t func)
Iterate over all nodes and call function for visible.
void ClearDrawData()
Clear raw data. Will be rebuild when next connection will be established.
bool ChangeNodeVisibility(int nodeid, bool selected)
Change visibility for specified element Returns true if changes was performed.
void ProduceIdShifts()
Count total number of visible childs under each node.
std::string MakeDrawingJson(REveGeomDrawing &drawing, bool has_shapes=false)
Produce JSON for the drawing If TGeoShape appears in the drawing, one has to keep typeinfo But in thi...
void ResetRndrInfos()
Reset shape info, which used to pack binary data.
ShapeDescr & FindShapeDescr(TGeoShape *shape)
Find description object for requested shape If not exists - will be created.
bool IsPrincipalEndNode(int nodeid)
return true when node used in main geometry drawing and does not have childs for such nodes one could...
int FindNodeId(const std::vector< int > &stack)
Returns nodeid for given stack array, returns -1 in case of failure.
std::string ProcessBrowserRequest(const std::string &req="")
Find description object for requested shape If not exists - will be created.
std::unique_ptr< REveGeomNodeInfo > MakeNodeInfo(const std::string &path)
Change visibility for specified element Returns true if changes was performed.
std::string MakePathByStack(const std::vector< int > &stack)
Returns path string for provided stack.
void PackMatrix(std::vector< float > &arr, TGeoMatrix *matr)
Pack matrix into vector, which can be send to client Following sizes can be used for vector: 0 - Iden...
std::vector< int > MakeStackByPath(const std::string &path)
Produce stack based on string path Used to highlight geo volumes by browser hover event.
std::vector< int > MakeIdsByStack(const std::vector< int > &stack)
Produce list of node ids for given stack If found nodes preselected - use their ids.
void CopyMaterialProperties(TGeoVolume *vol, REveGeomNode &node)
Copy material properties.
int MarkVisible(bool on_screen=false)
Set visibility flag for each nodes.
Object with full description for drawing geometry It includes list of visible items and list of nodes...
std::vector< REveGeomNode * > nodes
all used nodes to display visible items and not known for client
std::vector< REveGeomVisible > visibles
all visible items
int numnodes
total number of nodes in description
REveGeomConfig * cfg
current configurations
int sortid
! place in sorted array, to check cuts, or id of original node when used search structures
std::string color
rgb code without rgb() prefix
int id
node id, index in array
Full node description including matrices and other attributes.
float opacity
! opacity of the color
int Write(char *msg, int maxlen)
Write render data to binary buffer.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
Class for serializing object to and from JavaScript Object Notation (JSON) format.
static TString ToJSON(const T *obj, Int_t compact=0, const char *member_name=nullptr)
The color creation and management class.
virtual Double_t GetDX() const
Class handling Boolean composition of shapes.
void Skip()
Stop iterating the current branch.
The manager class for any TGeo geometry.
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
Int_t GetMaxVisNodes() const
TGeoNode * GetTopNode() const
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
Int_t GetNsegments() const
Get number of segments approximating circles.
TGeoVolume * GetTopVolume() const
Geometrical transformation package.
virtual const Double_t * GetTranslation() const =0
virtual const Double_t * GetScale() const =0
Bool_t IsIdentity() const
virtual const Double_t * GetRotationMatrix() const =0
TGeoMaterial * GetMaterial() const
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TGeoVolume * GetVolume() const
void SetNumber(Int_t number)
Base abstract class for all shapes.
virtual Bool_t IsComposite() const
virtual Bool_t IsCylType() const =0
virtual const char * GetName() const
Get the shape name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
TGeoMedium * GetMedium() const
static TGeoMedium * DummyMedium()
TGeoShape * GetShape() const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
const char * Data() const
std::function< bool(REveGeomNode &, std::vector< int > &, bool, int)> REveGeomScanFunc_t
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
static constexpr double s
basic_json<> json
default JSON class