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 if (fNodeId >= (
int) fDesc.fDesc.size())
80 auto &node = fDesc.fDesc[fNodeId];
81 if (node.chlds.size() == 0)
return false;
82 fStackParents.emplace_back(fParentId);
83 fStackChilds.emplace_back(fChild);
86 fNodeId = node.chlds[fChild];
92 if (fStackParents.size() == 0) {
96 fParentId = fStackParents.back();
97 fChild = fStackChilds.back();
99 fStackParents.pop_back();
100 fStackChilds.pop_back();
105 fNodeId = fDesc.fDesc[fParentId].chlds[fChild];
113 if ((fNodeId <= 0) || (fParentId < 0)) {
118 auto &prnt = fDesc.fDesc[fParentId];
119 if (++fChild >= prnt.chlds.size()) {
124 fNodeId = prnt.chlds[fChild];
133 fStackParents.clear();
134 fStackChilds.clear();
141 if (Enter())
return true;
143 if (Next())
return true;
146 if (Next())
return true;
153 bool Navigate(
const std::string &path)
155 size_t pos = path.find(
"/");
156 if (pos != 0)
return false;
160 while (++pos < path.length()) {
163 pos = path.find(
"/", last);
165 if (pos == std::string::npos) pos = path.length();
167 std::string folder = path.substr(last, pos-last);
169 if (!Enter())
return false;
174 find = (folder.compare(GetName()) == 0);
175 }
while (!find && Next());
177 if (!find)
return false;
184 bool Navigate(
const std::vector<std::string> &path)
188 for (
auto &folder : path) {
190 if (!Enter())
return false;
195 find = (folder.compare(GetName()) == 0);
196 }
while (!find && Next());
198 if (!find)
return false;
206 std::vector<int> CurrentIds()
const
208 std::vector<int> res;
210 for (
unsigned n=1;
n<fStackParents.size();++
n)
211 res.emplace_back(fStackParents[
n]);
212 if (fParentId >= 0) res.emplace_back(fParentId);
213 res.emplace_back(fNodeId);
243 bool is_translate = matr->IsA() == TGeoTranslation::Class(),
244 is_scale = matr->IsA() == TGeoScale::Class(),
245 is_rotate = matr->IsA() == TGeoRotation::Class();
247 if (!is_translate && !is_scale && !is_rotate) {
250 auto test = [](
double val,
double chk) {
return (val==chk) || (
TMath::Abs(val-chk) < 1
e-20); };
252 bool no_scale =
test(scale[0],1) &&
test(scale[1],1) &&
test(scale[2],1);
253 bool no_trans =
test(trans[0],0) &&
test(trans[1],0) &&
test(trans[2],0);
254 bool no_rotate =
test(rotate[0],1) &&
test(rotate[1],0) &&
test(rotate[2],0) &&
255 test(rotate[3],0) &&
test(rotate[4],1) &&
test(rotate[5],0) &&
256 test(rotate[6],0) &&
test(rotate[7],0) &&
test(rotate[8],1);
258 if (no_scale && no_trans && no_rotate)
261 if (no_scale && no_trans && !no_rotate) {
263 }
else if (no_scale && !no_trans && no_rotate) {
265 }
else if (!no_scale && no_trans && no_rotate) {
289 for (
int n=0;
n<9;++
n)
295 vect[0] = rotate[0]; vect[4] = rotate[1]; vect[8] = rotate[2]; vect[12] = trans[0];
296 vect[1] = rotate[3]; vect[5] = rotate[4]; vect[9] = rotate[5]; vect[13] = trans[1];
297 vect[2] = rotate[6]; vect[6] = rotate[7]; vect[10] = rotate[8]; vect[14] = trans[2];
298 vect[3] = 0; vect[7] = 0; vect[11] = 0; vect[15] = 1;
316 if (!volname.empty()) {
317 auto vol = mgr->
GetVolume(volname.c_str());
321 while ((node=next())) {
324 if (node) { topnode = node; printf(
"Find node with volume\n"); }
336 SetMaxVisNodes(maxnodes);
337 SetMaxVisFaces( (maxnodes > 5000 ? 5000 : (maxnodes < 1000 ? 1000 : maxnodes)) * 100);
340 std::vector<int> numbers;
341 int offset = 1000000000;
351 numbers.emplace_back(snode->
GetNumber());
352 snode->
SetNumber(offset + fNodes.size());
353 fNodes.emplace_back(snode);
355 }
while ((snode = iter()) !=
nullptr);
357 fDesc.reserve(fNodes.size());
358 numbers.reserve(fNodes.size());
359 fSortMap.reserve(fNodes.size());
362 std::vector<REveGeomNode *> sortarr;
363 sortarr.reserve(fNodes.size());
367 for (
auto &node: fNodes) {
369 fDesc.emplace_back(node->GetNumber() - offset);
370 auto &desc = fDesc[cnt++];
372 sortarr.emplace_back(&desc);
374 desc.name = node->GetName();
376 auto shape =
dynamic_cast<TGeoBBox *
>(node->GetVolume()->GetShape());
378 desc.vol = shape->
GetDX()*shape->GetDY()*shape->GetDZ();
382 CopyMaterialProperties(node->GetVolume(), desc);
384 auto chlds = node->GetNodes();
386 PackMatrix(desc.matr, node->GetMatrix());
389 for (
int n = 0;
n <= chlds->GetLast(); ++
n) {
390 auto chld =
dynamic_cast<TGeoNode *
> (chlds->At(
n));
391 desc.chlds.emplace_back(chld->GetNumber()-offset);
397 for (
auto &node: fNodes)
398 node->SetNumber(numbers[cnt++]);
404 for (
auto &elem: sortarr) {
405 fSortMap.emplace_back(elem->id);
406 elem->sortid = cnt++;
419 int res = 0, cnt = 0;
420 for (
auto &node: fNodes) {
421 auto &desc = fDesc[cnt++];
423 desc.nochlds =
false;
426 if (node->IsOnScreen())
429 auto vol = node->GetVolume();
434 if (!node->IsVisDaughters())
437 if ((desc.vis > 0) && (desc.chlds.size() > 0) && !desc.nochlds)
441 if (desc.IsVisible() && desc.CanDisplay()) res++;
452 for (
auto &node : fDesc)
458 if (node.idshift < 0) {
460 for(
auto id : node.chlds)
461 node.idshift += scan_func(fDesc[
id]);
464 return node.idshift + 1;
467 if (fDesc.size() > 0)
476 if (fDesc.empty())
return 0;
478 std::vector<int> stack;
482 using ScanFunc_t = std::function<
int(
int,
int)>;
484 ScanFunc_t scan_func = [&,
this](
int nodeid,
int lvl) {
485 auto &desc = fDesc[nodeid];
488 if (desc.nochlds && (lvl > 0)) lvl = 0;
491 bool is_visible = (lvl >= 0) && (desc.vis > lvl) && desc.CanDisplay();
493 if (is_visible || !only_visible)
494 if (func(desc, stack, is_visible, counter))
499 if ((desc.chlds.size() > 0) && ((lvl > 0) || !only_visible)) {
500 auto pos = stack.size();
501 stack.emplace_back(0);
502 for (
unsigned k = 0; k < desc.chlds.size(); ++k) {
504 res += scan_func(desc.chlds[k], lvl - 1);
508 counter += desc.idshift;
514 if (!maxlvl && (GetVisLevel() > 0)) maxlvl = GetVisLevel();
515 if (!maxlvl) maxlvl = 4;
516 if (maxlvl > 97) maxlvl = 97;
518 return scan_func(0, maxlvl);
527 for (
auto &node : fDesc)
528 node.useflag =
false;
534 for (
auto &item : drawing.
visibles) {
536 for (
auto &chindx : item.stack) {
537 auto &node = fDesc[nodeid];
540 drawing.
nodes.emplace_back(&node);
542 if (chindx >= (
int)node.chlds.size())
544 nodeid = node.chlds[chindx];
547 auto &node = fDesc[nodeid];
550 drawing.
nodes.emplace_back(&node);
554 printf(
"SELECT NODES %d\n", (
int) drawing.
nodes.size());
565 auto request = TBufferJSON::FromJSON<RBrowserRequest>(msg);
568 request = std::make_unique<RBrowserRequest>();
570 request->number = 100;
576 if (request->path.empty() && (request->first == 0) && (GetNumNodes() < (IsPreferredOffline() ? 1000000 : 1000))) {
578 std::vector<REveGeomNodeBase *> vect(fDesc.size(),
nullptr);
581 for (
auto &item : fDesc)
587 RGeomBrowserIter iter(*
this);
589 while (iter.NextNode())
591 printf(
"Total number of valid nodes %d\n", nelements);
594 std::vector<Browsable::RItem> temp_nodes;
595 bool toplevel = request->path.empty();
599 reply.path = request->path;
600 reply.first = request->first;
602 RGeomBrowserIter iter(*
this);
603 if (iter.Navigate(request->path)) {
605 reply.nchilds = iter.NumChilds();
609 while ((request->first > 0) && iter.Next()) {
613 while (iter.IsValid() && (request->number > 0)) {
614 temp_nodes.emplace_back(iter.GetName(), iter.NumChilds());
615 if (toplevel) temp_nodes.back().SetExpanded(
true);
617 if (!iter.Next())
break;
622 for (
auto &
n : temp_nodes)
623 reply.nodes.emplace_back(&
n);
637 for (
auto &descr : fShapes)
638 if (descr.fShape == shape)
641 fShapes.emplace_back(shape);
642 auto &elem = fShapes.back();
643 elem.
id = fShapes.size() - 1;
653 auto &elem = FindShapeDescr(shape);
655 if (elem.nfaces == 0) {
669 if (IsBuildShapes() < boundary) {
671 elem.fShapeInfo.shape = shape;
674 auto poly = std::make_unique<REveGeoPolyShape>();
677 poly->BuildFromComposite(comp, GetNSegments());
679 poly->BuildFromShape(shape, GetNSegments());
684 poly->FillRenderData(rd);
686 elem.nfaces = poly->GetNumFaces();
689 rd.
Write(
reinterpret_cast<char *
>(elem.fRawInfo.raw.data()), elem.fRawInfo.raw.size() );
690 elem.fRawInfo.sz[0] = rd.
SizeV();
691 elem.fRawInfo.sz[1] = rd.
SizeN();
692 elem.fRawInfo.sz[2] = rd.
SizeI();
718 if ((fillstyle>=3000) && (fillstyle<=3100)) node.
opacity = (3100 - fillstyle) / 100.;
719 if (!col) col =
gROOT->GetColor(material->GetFillColor());
723 node.
color = std::to_string((
int)(col->GetRed()*255)) +
"," +
724 std::to_string((
int)(col->GetGreen()*255)) +
"," +
725 std::to_string((
int)(col->GetBlue()*255));
727 node.
opacity = col->GetAlpha();
738 for (
auto &s: fShapes)
748 std::vector<int> viscnt(fDesc.size(), 0);
750 int level = GetVisLevel();
753 int numnodes = ScanNodes(
true, level, [&viscnt](
REveGeomNode &node, std::vector<int> &,
bool,
int) {
758 if (GetMaxVisNodes() > 0) {
759 while ((numnodes > GetMaxVisNodes()) && (level > 1)) {
761 viscnt.assign(viscnt.size(), 0);
762 numnodes = ScanNodes(
true, level, [&viscnt](
REveGeomNode &node, std::vector<int> &,
bool,
int) {
769 fActualLevel = level;
772 int totalnumfaces{0}, totalnumnodes{0};
778 for (
auto &sid: fSortMap) {
780 auto &desc = fDesc[sid];
782 if ((viscnt[sid] <= 0) || (desc.vol <= 0))
continue;
784 auto shape = fNodes[sid]->GetVolume()->GetShape();
785 if (!shape)
continue;
788 auto &shape_descr = MakeShapeDescr(shape);
791 if (shape_descr.nfaces <= 0) {
792 R__LOG_ERROR(
EveLog()) <<
"No faces for the shape " << shape->GetName() <<
" class " << shape->ClassName();
797 totalnumfaces += shape_descr.nfaces * viscnt[sid];
798 if ((GetMaxVisFaces() > 0) && (totalnumfaces > GetMaxVisFaces()))
break;
801 totalnumnodes += viscnt[sid];
802 if ((GetMaxVisNodes() > 0) && (totalnumnodes > GetMaxVisNodes()))
break;
812 bool has_shape =
false;
814 ScanNodes(
true, level, [&,
this](
REveGeomNode &node, std::vector<int> &stack,
bool,
int seqid) {
815 if (node.
sortid < fDrawIdCut) {
816 drawing.visibles.emplace_back(node.id, seqid, stack);
818 auto &item = drawing.visibles.back();
819 item.color = node.color;
820 item.opacity = node.opacity;
822 auto volume = fNodes[node.id]->GetVolume();
824 auto &sd = MakeShapeDescr(volume->GetShape());
826 item.ri = sd.rndr_info();
827 if (sd.has_shape()) has_shape = true;
832 CollectNodes(drawing);
834 fDrawJson =
"GDRAW:"s + MakeDrawingJson(drawing, has_shape);
853 if ((nodeid < 0) || (nodeid >= (
int)fDesc.size()))
856 auto &desc = fDesc[nodeid];
858 return (desc.sortid < fDrawIdCut) && desc.IsVisible() && desc.CanDisplay() && (desc.chlds.size()==0);
873 hjson =
"FOUND:RESET";
877 std::vector<int> nodescnt(fDesc.size(), 0), viscnt(fDesc.size(), 0);
882 return (node.vol > 0) && (node.name.compare(0, find.length(), find) == 0);
886 ScanNodes(
false, 0, [&nodescnt,&viscnt,&match_func,&nmatches](
REveGeomNode &node, std::vector<int> &,
bool is_vis,
int) {
888 if (match_func(node)) {
891 if (is_vis) viscnt[node.
id]++;
902 if (nmatches > 10 * GetMaxVisNodes()) {
903 hjson =
"FOUND:Too many " + std::to_string(nmatches);
909 int totalnumfaces{0}, totalnumnodes{0}, scnt{0};
910 bool send_rawdata{
true};
913 for (
auto &sid: fSortMap) {
914 if (scnt++ < fDrawIdCut)
continue;
916 if (viscnt[sid] == 0)
continue;
918 auto &desc = fDesc[sid];
919 if ((viscnt[sid] <= 0) && (desc.vol <= 0))
continue;
921 auto shape = fNodes[sid]->GetVolume()->GetShape();
922 if (!shape)
continue;
925 auto &shape_descr = MakeShapeDescr(shape);
928 if (shape_descr.nfaces <= 0) {
929 R__LOG_ERROR(
EveLog()) <<
"No faces for the shape " << shape->GetName() <<
" class " << shape->ClassName();
934 totalnumfaces += shape_descr.nfaces * viscnt[sid];
935 if ((GetMaxVisFaces() > 0) && (totalnumfaces > GetMaxVisFaces())) { send_rawdata =
false;
break; }
938 totalnumnodes += viscnt[sid];
939 if ((GetMaxVisNodes() > 0) && (totalnumnodes > GetMaxVisNodes())) { send_rawdata =
false;
break; }
949 std::vector<REveGeomNodeBase> found_desc;
950 std::vector<int> found_map(fDesc.size(), -1);
954 found_desc.emplace_back(0);
955 found_desc[0].vis = fDesc[0].vis;
956 found_desc[0].name = fDesc[0].name;
957 found_desc[0].color = fDesc[0].color;
963 bool has_shape =
true;
965 ScanNodes(
false, 0, [&,
this](
REveGeomNode &node, std::vector<int> &stack,
bool is_vis,
int seqid) {
967 if (!match_func(node))
972 for (
auto &s : stack) {
973 int chldid = fDesc[prntid].chlds[s];
974 if (found_map[chldid] <= 0) {
975 int newid = found_desc.size();
976 found_desc.emplace_back(newid);
977 found_map[chldid] = newid;
979 found_desc.back().vis = fDesc[chldid].vis;
980 found_desc.back().name = fDesc[chldid].name;
981 found_desc.back().color = fDesc[chldid].color;
984 auto pid = found_map[prntid];
985 auto cid = found_map[chldid];
988 auto &pchlds = found_desc[pid].chlds;
989 if (std::find(pchlds.begin(), pchlds.end(), cid) == pchlds.end())
990 pchlds.emplace_back(cid);
996 if (!is_vis)
return true;
998 drawing.
visibles.emplace_back(node.
id, seqid, stack);
1002 if (!send_rawdata || (node.
sortid < fDrawIdCut)) {
1007 auto &item = drawing.
visibles.back();
1008 auto volume = fNodes[node.
id]->GetVolume();
1010 item.color = node.
color;
1013 auto &sd = MakeShapeDescr(volume->GetShape());
1015 item.ri = sd.rndr_info();
1016 if (sd.has_shape()) has_shape =
true;
1022 CollectNodes(drawing);
1024 json =
"FDRAW:"s + MakeDrawingJson(drawing, has_shape);
1036 for (
auto &chindx: stack) {
1037 auto &node = fDesc[nodeid];
1038 if (chindx >= (
int) node.chlds.size())
return -1;
1039 nodeid = node.chlds[chindx];
1050 std::vector<int> stack;
1053 printf(
"Wrong first id\n");
1059 for (
unsigned k = 1; k < ids.size(); ++k) {
1061 int prntid = nodeid;
1064 if (nodeid >= (
int) fDesc.size()) {
1065 printf(
"Wrong node id %d\n", nodeid);
1069 auto &chlds = fDesc[prntid].chlds;
1070 auto pos = std::find(chlds.begin(), chlds.end(), nodeid);
1071 if (pos == chlds.end()) {
1072 printf(
"Wrong id %d not a child of %d - fail to find stack num %d\n", nodeid, prntid, (
int) chlds.size());
1077 stack.emplace_back(std::distance(chlds.begin(), pos));
1089 std::vector<int> res;
1091 RGeomBrowserIter iter(*
this);
1093 if (iter.Navigate(path))
1094 res = MakeStackByIds(iter.CurrentIds());
1105 std::vector<int> ids;
1107 ids.emplace_back(0);
1109 bool failure =
false;
1111 for (
auto s : stack) {
1112 auto &chlds = fDesc[nodeid].chlds;
1113 if (s >= (
int) chlds.size()) { failure =
true;
break; }
1115 ids.emplace_back(chlds[s]);
1121 printf(
"Fail to convert stack into list of nodes\n");
1133 std::vector<std::string> path;
1135 auto ids = MakeIdsByStack(stack);
1136 for (
auto &
id : ids)
1137 path.emplace_back(fDesc[
id].name);
1149 std::vector<REveGeomNodeBase *> nodes;
1150 auto vol = fNodes[nodeid]->GetVolume();
1156 for (
auto &desc : fDesc)
1157 if (fNodes[
id++]->GetVolume() == vol)
1158 nodes.emplace_back(&desc);
1173 TGeoVolume *vol = (nodeid < 0) ?
nullptr : fNodes[nodeid]->GetVolume();
1182 ScanNodes(
true, 0, [&,
this](
REveGeomNode &node, std::vector<int> &stack,
bool,
int seq_id) {
1186 if (fNodes[node.
id]->GetVolume() != vol)
return true;
1188 if (node.
id != nodeid)
return true;
1191 drawing.
visibles.emplace_back(node.
id, seq_id, stack);
1193 auto &item = drawing.
visibles.back();
1195 item.color = node.
color;
1208 bool has_shape =
false, has_raw =
false;
1210 auto &sd = MakeShapeDescr(vol->
GetShape());
1213 for (
auto &item : drawing.
visibles) {
1214 item.ri = sd.rndr_info();
1215 if (sd.has_shape()) has_shape =
true;
1216 if (sd.has_raw()) has_raw =
true;
1219 CollectNodes(drawing);
1221 json.append(MakeDrawingJson(drawing, has_shape));
1223 return has_raw || has_shape;
1234 int comp = GetJsonComp();
1249 return json.
StoreObject(&drawing, TClass::GetClass<REveGeomDrawing>()).
Data();
1258 auto &dnode = fDesc[nodeid];
1260 auto vol = fNodes[nodeid]->GetVolume();
1263 if (vol->IsVisible() == selected)
1266 dnode.vis = selected ? 99 : 0;
1267 vol->SetVisibility(selected);
1268 if (dnode.chlds.size() > 0) {
1269 if (selected) dnode.vis = 1;
1270 vol->SetVisDaughters(selected);
1274 for (
auto &desc: fDesc)
1275 if (fNodes[
id++]->GetVolume() == vol)
1276 desc.vis = dnode.vis;
1289 std::unique_ptr<REveGeomNodeInfo> res;
1291 RGeomBrowserIter iter(*
this);
1293 if (iter.Navigate(path)) {
1295 auto node = fNodes[iter.GetNodeId()];
1297 auto &desc = fDesc[iter.GetNodeId()];
1299 res = std::make_unique<REveGeomNodeInfo>();
1302 res->node_name = node->GetName();
1303 res->node_type = node->ClassName();
1305 TGeoShape *shape = node->GetVolume() ? node->GetVolume()->GetShape() :
nullptr;
1308 res->shape_name = shape->
GetName();
1312 if (shape && desc.CanDisplay()) {
1314 auto &shape_descr = MakeShapeDescr(shape);
1316 res->ri = shape_descr.rndr_info();
1329 auto cfg = TBufferJSON::FromJSON<REveGeomConfig>(json);
1330 if (!cfg)
return false;
#define R__LOG_ERROR(...)
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.
std::unique_ptr< REveGeomNodeInfo > MakeNodeInfo(const std::vector< std::string > &path)
Change visibility for specified element Returns true if changes was performed.
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::vector< int > MakeStackByPath(const std::vector< std::string > &path)
Produce stack based on string path Used to highlight geo volumes by browser hover event.
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.
std::vector< std::string > MakePathByStack(const std::vector< int > &stack)
Returns path string for provided stack.
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.
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 > 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.
TString StoreObject(const void *obj, const TClass *cl)
Store provided object as JSON structure Allows to configure different TBufferJSON properties before c...
static TString ToJSON(const T *obj, Int_t compact=0, const char *member_name=nullptr)
void SetSkipClassInfo(const TClass *cl)
Specify class which typename will not be stored in JSON Several classes can be configured To exclude ...
void SetCompact(int level)
Set level of space/newline/array compression Lower digit of compact parameter define formatting rules...
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
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
RLogChannel & EveLog()
Log channel for Eve diagnostics.
std::function< bool(REveGeomNode &, std::vector< int > &, bool, int)> REveGeomScanFunc_t
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...