Logo ROOT  
Reference Guide
REveGeomData.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Author: Sergey Linev, 14.12.2018
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 #ifndef ROOT7_REveGeomData
13 #define ROOT7_REveGeomData
14 
15 #include <ROOT/REveRenderData.hxx>
16 
17 #include <vector>
18 #include <string>
19 #include <functional>
20 #include <memory>
21 
22 class TGeoNode;
23 class TGeoManager;
24 class TGeoShape;
25 class TGeoMatrix;
26 class TGeoVolume;
27 
28 // do not use namespace to avoid too long JSON
29 
30 namespace ROOT {
31 namespace Experimental {
32 
33 class REveRenderData;
34 class RGeomBrowserIter;
35 
36 /** Base description of geometry node, required only to build hierarchy */
37 
39 public:
40  int id{0}; ///< node id, index in array
41  std::string name; ///< node name
42  std::vector<int> chlds; ///< list of childs id
43  int vis{0}; ///< visibility flag, 0 - off, 1 - only when level==0, 99 - always
44  bool nochlds{false}; ///< how far in hierarchy depth should be scanned
45 
46  std::string color; ///< rgb code without rgb() prefix
47  int sortid{0}; ///<! place in sorted array, to check cuts, or id of original node when used search structures
48 
49  REveGeomNodeBase(int _id = 0) : id(_id) {}
50 
51  bool IsVisible() const { return vis > 0; }
52 };
53 
54 /** Full node description including matrices and other attributes */
55 
57 public:
58  std::vector<float> matr; ///< matrix for the node, can have reduced number of elements
59  double vol{0}; ///<! volume estimation
60  int nfaces{0}; ///<! number of shape faces
61  int idshift{-1}; ///<! used to jump over then scan all geom hierarchy
62  bool useflag{false}; ///<! extra flag, used for selection
63  float opacity{1.}; ///<! opacity of the color
64 
65  REveGeomNode(int _id = 0) : REveGeomNodeBase(_id) {}
66 
67  /** True when there is shape and it can be displayed */
68  bool CanDisplay() const { return (vol > 0.) && (nfaces > 0); }
69 };
70 
71 /** Base class for render info block */
73 public:
74  /// virtual destructor required for the I/O
75  virtual ~RGeomRenderInfo() = default;
76 };
77 
78 /** Render info with raw data */
80 public:
81  // render data, equivalent of REveElement::WriteCoreJson
82  int sz[3]={0,0, 0}; ///< fRenderData: [SizeV(), SizeN(), SizeI()];
83  std::vector<unsigned char> raw; ///< raw shape data with render information, JSON_base64
84  virtual ~RGeomRawRenderInfo() = default;
85 };
86 
87 /** Render info with shape itself - client can produce shape better */
89 public:
90  TGeoShape *shape{nullptr}; ///< original shape - can be much less than binary data
91  virtual ~RGeomShapeRenderInfo() = default;
92 };
93 
94 
95 /** REveGeomVisible contains description of visible node
96  * It is path to the node plus reference to shape rendering data */
97 
99 public:
100  int nodeid{0}; ///< selected node id,
101  int seqid{0}; ///< sequence id, used for merging later
102  std::vector<int> stack; ///< path to the node, index in list of childs
103  std::string color; ///< color in rgb format
104  double opacity{1}; ///< opacity
105  RGeomRenderInfo *ri{nullptr}; ///< render information for the shape, can be same for different nodes
106 
107  REveGeomVisible() = default;
108  REveGeomVisible(int _nodeid, int _seqid, const std::vector<int> &_stack) : nodeid(_nodeid), seqid(_seqid), stack(_stack) {}
109 };
110 
111 
112 /** Configuration parameters which can be configured on the client
113  * Send as is to-from client */
114 
116 public:
117  int vislevel{0}; ///< visible level
118  int maxnumnodes{0}; ///< maximal number of nodes
119  int maxnumfaces{0}; ///< maximal number of faces
120  bool showtop{false}; ///< show geometry top volume, off by default
121  int build_shapes{1}; ///< when shapes build on server 0 - never, 1 - TGeoComposite, 2 - plus non-cylindrical, 3 - all
122  int nsegm{0}; ///< number of segments for cylindrical shapes
123  std::string drawopt; ///< draw options for TGeoPainter
124 };
125 
126 
127 /** Object with full description for drawing geometry
128  * It includes list of visible items and list of nodes required to build them */
129 
131 public:
132  REveGeomConfig *cfg{nullptr}; ///< current configurations
133  int numnodes{0}; ///< total number of nodes in description
134  std::vector<REveGeomNode*> nodes; ///< all used nodes to display visible items and not known for client
135  std::vector<REveGeomVisible> visibles; ///< all visible items
136 };
137 
138 
139 /** Request object send from client for different operations */
141 public:
142  std::string oper; ///< operation like HIGHL or HOVER
143  std::string path; ///< path parameter, used with HOVER
144  std::vector<int> stack; ///< stack parameter, used with HIGHL
145 };
146 
148 public:
149  std::string fullpath; ///< full path to node
150  std::string node_type; ///< node class name
151  std::string node_name; ///< node name
152  std::string shape_type; ///< shape type (if any)
153  std::string shape_name; ///< shape class name (if any)
154 
155  RGeomRenderInfo *ri{nullptr}; ///< rendering information (if applicable)
156 };
157 
158 using REveGeomScanFunc_t = std::function<bool(REveGeomNode &, std::vector<int> &, bool, int)>;
159 
160 
162 
163  friend class RGeomBrowserIter;
164 
165  class ShapeDescr {
166  public:
167  int id{0}; ///<! sequential id
168  TGeoShape *fShape{nullptr}; ///<! original shape
169  int nfaces{0}; ///<! number of faces in render data
170  RGeomRawRenderInfo fRawInfo; ///<! raw render info
171  RGeomShapeRenderInfo fShapeInfo; ///<! shape itself as info
173 
174  bool has_shape() const { return nfaces == 1; }
175  bool has_raw() const { return nfaces > 1; }
176 
177  /// Provide render info for visible item
179  {
180  if (has_shape()) return &fShapeInfo;
181  if (has_raw()) return &fRawInfo;
182  return nullptr;
183  }
184 
185  void reset()
186  {
187  nfaces = 0;
188  fShapeInfo.shape = nullptr;
189  fRawInfo.raw.clear();
190  }
191  };
192 
193  std::vector<TGeoNode *> fNodes; ///<! flat list of all nodes
194  std::vector<REveGeomNode> fDesc; ///< converted description, send to client
195 
196  std::vector<int> fSortMap; ///<! nodes in order large -> smaller volume
197  std::vector<ShapeDescr> fShapes; ///<! shapes with created descriptions
198 
199  std::string fDrawJson; ///<! JSON with main nodes drawn by client
200  int fDrawIdCut{0}; ///<! sortid used for selection of most-significant nodes
201  int fActualLevel{0}; ///<! level can be reduced when selecting nodes
202  bool fPreferredOffline{false}; ///<! indicates that full description should be provided to client
203  int fJsonComp{0}; ///<! default JSON compression
204 
205  REveGeomConfig fCfg; ///<! configuration parameter editable from GUI
206 
207  void PackMatrix(std::vector<float> &arr, TGeoMatrix *matr);
208 
209  int MarkVisible(bool on_screen = false);
210 
211  void ProduceIdShifts();
212 
213  int ScanNodes(bool only_visible, int maxlvl, REveGeomScanFunc_t func);
214 
215  void ResetRndrInfos();
216 
218 
220 
222 
223  void CollectNodes(REveGeomDrawing &drawing);
224 
225  std::string MakeDrawingJson(REveGeomDrawing &drawing, bool has_shapes = false);
226 
227 public:
228  REveGeomDescription() = default;
229 
230  void Build(TGeoManager *mgr, const std::string &volname = "");
231 
232  /** Number of unique nodes in the geometry */
233  int GetNumNodes() const { return fDesc.size(); }
234 
235  bool IsBuild() const { return GetNumNodes() > 0; }
236 
237  /** Set maximal number of nodes which should be selected for drawing */
239 
240  /** Returns maximal visible number of nodes, ignored when non-positive */
241  int GetMaxVisNodes() const { return fCfg.maxnumnodes; }
242 
243  /** Set maximal number of faces which should be selected for drawing */
245 
246  /** Returns maximal visible number of faces, ignored when non-positive */
247  int GetMaxVisFaces() const { return fCfg.maxnumfaces; }
248 
249  /** Set maximal visible level */
250  void SetVisLevel(int lvl = 3) { fCfg.vislevel = lvl; }
251 
252  /** Returns maximal visible level */
253  int GetVisLevel() const { return fCfg.vislevel; }
254 
255  /** Set preference of offline operations.
256  * Server provides more info to client from the begin on to avoid communication */
257  void SetPreferredOffline(bool on) { fPreferredOffline = on; }
258 
259  /** Is offline operations preferred.
260  * After get full description, client can do most operations without extra requests */
261  bool IsPreferredOffline() const { return fPreferredOffline; }
262 
263  bool CollectVisibles();
264 
265  bool IsPrincipalEndNode(int nodeid);
266 
267  std::string ProcessBrowserRequest(const std::string &req = "");
268 
269  bool HasDrawData() const { return (fDrawJson.length() > 0) && (fDrawIdCut > 0); }
270  const std::string &GetDrawJson() const { return fDrawJson; }
271  void ClearDrawData();
272 
273  int SearchVisibles(const std::string &find, std::string &hjson, std::string &json);
274 
275  int FindNodeId(const std::vector<int> &stack);
276 
277  std::string ProduceModifyReply(int nodeid);
278 
279  std::vector<int> MakeStackByIds(const std::vector<int> &ids);
280 
281  std::vector<int> MakeIdsByStack(const std::vector<int> &stack);
282 
283  std::vector<int> MakeStackByPath(const std::string &path);
284 
285  std::string MakePathByStack(const std::vector<int> &stack);
286 
287  bool ProduceDrawingFor(int nodeid, std::string &json, bool check_volume = false);
288 
289  bool ChangeNodeVisibility(int nodeid, bool selected);
290 
291  /** Set number of segments for cylindrical shapes, if 0 - default value will be used */
292  void SetNSegments(int n = 0) { fCfg.nsegm = n; }
293  /** Return of segments for cylindrical shapes, if 0 - default value will be used */
294  int GetNSegments() const { return fCfg.nsegm; }
295 
296  /** Set JSON compression level for data transfer */
297  void SetJsonComp(int comp = 0) { fJsonComp = comp; }
298  /** Returns JSON compression level for data transfer */
299  int GetJsonComp() const { return fJsonComp; }
300 
301  /** Set draw options as string for JSROOT TGeoPainter */
302  void SetDrawOptions(const std::string &opt = "") { fCfg.drawopt = opt; }
303  /** Returns draw options, used for JSROOT TGeoPainter */
304  std::string GetDrawOptions() const { return fCfg.drawopt; }
305 
306  /** Instruct to build binary 3D model already on the server (true) or send TGeoShape as is to client, which can build model itself */
307  void SetBuildShapes(int lvl = 1) { fCfg.build_shapes = lvl; }
308  /** Returns true if binary 3D model build already by C++ server (default) */
309  int IsBuildShapes() const { return fCfg.build_shapes; }
310 
311  bool ChangeConfiguration(const std::string &json);
312 
313  std::unique_ptr<REveGeomNodeInfo> MakeNodeInfo(const std::string &path);
314 };
315 
316 
317 } // namespace Experimental
318 } // namespace ROOT
319 
320 #endif
n
const Int_t n
Definition: legend1.C:16
ROOT::Experimental::REveGeomNodeBase::name
std::string name
node name
Definition: REveGeomData.hxx:41
ROOT::Experimental::REveGeomRequest::path
std::string path
path parameter, used with HOVER
Definition: REveGeomData.hxx:143
ROOT::Experimental::REveGeomDescription::MarkVisible
int MarkVisible(bool on_screen=false)
Set visibility flag for each nodes.
Definition: REveGeomData.cxx:393
ROOT::Experimental::REveGeomDescription::MakeStackByPath
std::vector< int > MakeStackByPath(const std::string &path)
Produce stack based on string path Used to highlight geo volumes by browser hover event.
Definition: REveGeomData.cxx:1062
ROOT::Experimental::REveGeomDescription::MakePathByStack
std::string MakePathByStack(const std::vector< int > &stack)
Returns path string for provided stack.
Definition: REveGeomData.cxx:1112
ROOT::Experimental::REveGeomDescription
Definition: REveGeomData.hxx:161
ROOT::Experimental::REveGeomDescription::SetPreferredOffline
void SetPreferredOffline(bool on)
Set preference of offline operations.
Definition: REveGeomData.hxx:257
ROOT::Experimental::REveGeomVisible::REveGeomVisible
REveGeomVisible(int _nodeid, int _seqid, const std::vector< int > &_stack)
Definition: REveGeomData.hxx:108
ROOT::Experimental::REveGeomVisible::stack
std::vector< int > stack
path to the node, index in list of childs
Definition: REveGeomData.hxx:102
ROOT::Experimental::REveGeomNode::vol
double vol
! volume estimation
Definition: REveGeomData.hxx:59
ROOT::Experimental::REveGeomDescription::ShapeDescr::has_shape
bool has_shape() const
Definition: REveGeomData.hxx:174
ROOT::Experimental::REveGeomNodeBase::REveGeomNodeBase
REveGeomNodeBase(int _id=0)
Definition: REveGeomData.hxx:49
ROOT::Experimental::REveGeomNodeBase
Base description of geometry node, required only to build hierarchy.
Definition: REveGeomData.hxx:38
ROOT::Experimental::REveGeomConfig::build_shapes
int build_shapes
when shapes build on server 0 - never, 1 - TGeoComposite, 2 - plus non-cylindrical,...
Definition: REveGeomData.hxx:121
ROOT::Experimental::RGeomRenderInfo
Base class for render info block.
Definition: REveGeomData.hxx:72
ROOT::Experimental::REveGeomDescription::ShapeDescr::fShape
TGeoShape * fShape
! original shape
Definition: REveGeomData.hxx:168
ROOT::Experimental::REveGeomVisible::seqid
int seqid
sequence id, used for merging later
Definition: REveGeomData.hxx:101
ROOT::Experimental::REveGeomDescription::CopyMaterialProperties
void CopyMaterialProperties(TGeoVolume *vol, REveGeomNode &node)
Copy material properties.
Definition: REveGeomData.cxx:678
ROOT::Experimental::REveGeomNodeBase::chlds
std::vector< int > chlds
list of childs id
Definition: REveGeomData.hxx:42
ROOT::Experimental::REveGeomDescription::SetDrawOptions
void SetDrawOptions(const std::string &opt="")
Set draw options as string for JSROOT TGeoPainter.
Definition: REveGeomData.hxx:302
ROOT::Experimental::REveGeomDescription::ProduceDrawingFor
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...
Definition: REveGeomData.cxx:1155
ROOT::Experimental::REveGeomDescription::ChangeConfiguration
bool ChangeConfiguration(const std::string &json)
Change configuration by client Returns true if any parameter was really changed.
Definition: REveGeomData.cxx:1313
ROOT::Experimental::REveGeomNode::opacity
float opacity
! opacity of the color
Definition: REveGeomData.hxx:63
ROOT::Experimental::REveGeomDescription::IsBuild
bool IsBuild() const
Definition: REveGeomData.hxx:235
ROOT::Experimental::REveGeomNodeInfo::fullpath
std::string fullpath
full path to node
Definition: REveGeomData.hxx:149
ROOT::Experimental::REveGeomDescription::GetDrawJson
const std::string & GetDrawJson() const
Definition: REveGeomData.hxx:270
ROOT::Experimental::REveGeomDescription::fActualLevel
int fActualLevel
! level can be reduced when selecting nodes
Definition: REveGeomData.hxx:201
ROOT::Experimental::REveGeomDescription::ShapeDescr::fShapeInfo
RGeomShapeRenderInfo fShapeInfo
! shape itself as info
Definition: REveGeomData.hxx:171
ROOT::Experimental::REveGeomDescription::fCfg
REveGeomConfig fCfg
! configuration parameter editable from GUI
Definition: REveGeomData.hxx:205
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
ROOT::Experimental::REveGeomVisible::nodeid
int nodeid
selected node id,
Definition: REveGeomData.hxx:100
ROOT::Experimental::REveGeomNodeBase::vis
int vis
visibility flag, 0 - off, 1 - only when level==0, 99 - always
Definition: REveGeomData.hxx:43
ROOT::Experimental::REveGeomDescription::GetMaxVisNodes
int GetMaxVisNodes() const
Returns maximal visible number of nodes, ignored when non-positive.
Definition: REveGeomData.hxx:241
ROOT::Experimental::REveGeomDescription::MakeStackByIds
std::vector< int > MakeStackByIds(const std::vector< int > &ids)
Creates stack for given array of ids, first element always should be 0.
Definition: REveGeomData.cxx:1023
ROOT::Experimental::REveGeomDescription::ShapeDescr::fRawInfo
RGeomRawRenderInfo fRawInfo
! raw render info
Definition: REveGeomData.hxx:170
ROOT::Experimental::REveGeomDescription::ProduceIdShifts
void ProduceIdShifts()
Count total number of visible childs under each node.
Definition: REveGeomData.cxx:426
ROOT::Experimental::REveGeomDescription::ShapeDescr::nfaces
int nfaces
! number of faces in render data
Definition: REveGeomData.hxx:169
ROOT::Experimental::REveGeomDescription::GetDrawOptions
std::string GetDrawOptions() const
Returns draw options, used for JSROOT TGeoPainter.
Definition: REveGeomData.hxx:304
ROOT::Experimental::REveGeomDescription::ShapeDescr::reset
void reset()
Definition: REveGeomData.hxx:185
ROOT::Experimental::REveGeomNodeBase::sortid
int sortid
! place in sorted array, to check cuts, or id of original node when used search structures
Definition: REveGeomData.hxx:47
ROOT::Experimental::REveGeomDrawing::numnodes
int numnodes
total number of nodes in description
Definition: REveGeomData.hxx:133
ROOT::Experimental::REveGeomNodeInfo::shape_name
std::string shape_name
shape class name (if any)
Definition: REveGeomData.hxx:153
ROOT::Experimental::REveGeomDescription::Build
void Build(TGeoManager *mgr, const std::string &volname="")
Collect information about geometry hierarchy into flat list like it done JSROOT.GEO....
Definition: REveGeomData.cxx:281
ROOT::Experimental::REveGeomNodeBase::color
std::string color
rgb code without rgb() prefix
Definition: REveGeomData.hxx:46
ROOT::Experimental::RGeomRawRenderInfo::sz
int sz[3]
fRenderData: [SizeV(), SizeN(), SizeI()];
Definition: REveGeomData.hxx:82
ROOT::Experimental::REveGeomDescription::RGeomBrowserIter
friend class RGeomBrowserIter
Definition: REveGeomData.hxx:163
ROOT::Experimental::REveGeomNode::nfaces
int nfaces
! number of shape faces
Definition: REveGeomData.hxx:60
ROOT::Experimental::REveGeomDrawing::cfg
REveGeomConfig * cfg
current configurations
Definition: REveGeomData.hxx:132
ROOT::Experimental::REveGeomDescription::fDrawIdCut
int fDrawIdCut
! sortid used for selection of most-significant nodes
Definition: REveGeomData.hxx:200
TGeoNode
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:41
ROOT::Experimental::REveGeomDescription::GetMaxVisFaces
int GetMaxVisFaces() const
Returns maximal visible number of faces, ignored when non-positive.
Definition: REveGeomData.hxx:247
bool
ROOT::Experimental::REveGeomVisible::color
std::string color
color in rgb format
Definition: REveGeomData.hxx:103
ROOT::Experimental::REveGeomDescription::CollectNodes
void CollectNodes(REveGeomDrawing &drawing)
Collect nodes which are used in visibles.
Definition: REveGeomData.cxx:498
ROOT::Experimental::REveGeomDrawing
Object with full description for drawing geometry It includes list of visible items and list of nodes...
Definition: REveGeomData.hxx:130
ROOT::Experimental::REveGeomRequest
Request object send from client for different operations.
Definition: REveGeomData.hxx:140
ROOT::Experimental::REveGeomDescription::SetMaxVisNodes
void SetMaxVisNodes(int cnt)
Set maximal number of nodes which should be selected for drawing.
Definition: REveGeomData.hxx:238
REveRenderData.hxx
ROOT::Experimental::REveGeomNodeInfo::node_type
std::string node_type
node class name
Definition: REveGeomData.hxx:150
ROOT::Experimental::REveGeomDescription::IsPreferredOffline
bool IsPreferredOffline() const
Is offline operations preferred.
Definition: REveGeomData.hxx:261
ROOT::Experimental::REveGeomDrawing::nodes
std::vector< REveGeomNode * > nodes
all used nodes to display visible items and not known for client
Definition: REveGeomData.hxx:134
ROOT::Experimental::REveGeomDescription::MakeIdsByStack
std::vector< int > MakeIdsByStack(const std::vector< int > &stack)
Produce list of node ids for given stack If found nodes preselected - use their ids.
Definition: REveGeomData.cxx:1084
ROOT::Experimental::REveGeomDescription::GetJsonComp
int GetJsonComp() const
Returns JSON compression level for data transfer.
Definition: REveGeomData.hxx:299
ROOT::Experimental::RGeomRawRenderInfo
Render info with raw data.
Definition: REveGeomData.hxx:79
ROOT::Experimental::REveGeomVisible::REveGeomVisible
REveGeomVisible()=default
ROOT::Experimental::REveGeomDescription::ShapeDescr::has_raw
bool has_raw() const
Definition: REveGeomData.hxx:175
ROOT::Experimental::REveGeomDescription::GetNSegments
int GetNSegments() const
Return of segments for cylindrical shapes, if 0 - default value will be used.
Definition: REveGeomData.hxx:294
ROOT::Experimental::REveGeomDescription::SetNSegments
void SetNSegments(int n=0)
Set number of segments for cylindrical shapes, if 0 - default value will be used.
Definition: REveGeomData.hxx:292
ROOT::Experimental::REveGeomDescription::CollectVisibles
bool CollectVisibles()
Collect all information required to draw geometry on the client This includes list of each visible no...
Definition: REveGeomData.cxx:721
TGeoShape
Base abstract class for all shapes.
Definition: TGeoShape.h:26
ROOT::Experimental::REveGeomDescription::ScanNodes
int ScanNodes(bool only_visible, int maxlvl, REveGeomScanFunc_t func)
Iterate over all nodes and call function for visible.
Definition: REveGeomData.cxx:450
ROOT::Experimental::REveGeomDescription::ShapeDescr::ShapeDescr
ShapeDescr(TGeoShape *s)
Definition: REveGeomData.hxx:172
ROOT::Experimental::REveGeomDescription::GetVisLevel
int GetVisLevel() const
Returns maximal visible level.
Definition: REveGeomData.hxx:253
ROOT::Experimental::REveGeomDescription::fDrawJson
std::string fDrawJson
! JSON with main nodes drawn by client
Definition: REveGeomData.hxx:199
ROOT::Experimental::REveGeomDescription::FindNodeId
int FindNodeId(const std::vector< int > &stack)
Returns nodeid for given stack array, returns -1 in case of failure.
Definition: REveGeomData.cxx:1007
ROOT::Experimental::REveGeomDescription::fNodes
std::vector< TGeoNode * > fNodes
! flat list of all nodes
Definition: REveGeomData.hxx:193
ROOT::Experimental::REveGeomDescription::IsPrincipalEndNode
bool IsPrincipalEndNode(int nodeid)
return true when node used in main geometry drawing and does not have childs for such nodes one could...
Definition: REveGeomData.cxx:826
ROOT::Experimental::REveGeomConfig::showtop
bool showtop
show geometry top volume, off by default
Definition: REveGeomData.hxx:120
ROOT::Experimental::REveGeomDescription::REveGeomDescription
REveGeomDescription()=default
ROOT::Experimental::REveGeomScanFunc_t
std::function< bool(REveGeomNode &, std::vector< int > &, bool, int)> REveGeomScanFunc_t
Definition: REveGeomData.hxx:158
ROOT::Experimental::REveGeomConfig::drawopt
std::string drawopt
draw options for TGeoPainter
Definition: REveGeomData.hxx:123
ROOT::Experimental::RGeomShapeRenderInfo
Render info with shape itself - client can produce shape better.
Definition: REveGeomData.hxx:88
ROOT::Experimental::REveGeomDescription::IsBuildShapes
int IsBuildShapes() const
Returns true if binary 3D model build already by C++ server (default)
Definition: REveGeomData.hxx:309
ROOT::Experimental::REveGeomDescription::SetJsonComp
void SetJsonComp(int comp=0)
Set JSON compression level for data transfer.
Definition: REveGeomData.hxx:297
ROOT::Experimental::RGeomRawRenderInfo::raw
std::vector< unsigned char > raw
raw shape data with render information, JSON_base64
Definition: REveGeomData.hxx:83
ROOT::R::function
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151
ROOT::Experimental::REveGeomDescription::ResetRndrInfos
void ResetRndrInfos()
Reset shape info, which used to pack binary data.
Definition: REveGeomData.cxx:711
ROOT::Experimental::REveGeomDescription::SetBuildShapes
void SetBuildShapes(int lvl=1)
Instruct to build binary 3D model already on the server (true) or send TGeoShape as is to client,...
Definition: REveGeomData.hxx:307
ROOT::Experimental::REveGeomDescription::ProcessBrowserRequest
std::string ProcessBrowserRequest(const std::string &req="")
Find description object for requested shape If not exists - will be created.
Definition: REveGeomData.cxx:535
ROOT::Experimental::REveGeomDescription::SearchVisibles
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 ...
Definition: REveGeomData.cxx:842
ROOT::Experimental::REveGeomDescription::fJsonComp
int fJsonComp
! default JSON compression
Definition: REveGeomData.hxx:203
ROOT::Experimental::REveGeomRequest::stack
std::vector< int > stack
stack parameter, used with HIGHL
Definition: REveGeomData.hxx:144
ROOT::Experimental::REveGeomNodeInfo::ri
RGeomRenderInfo * ri
rendering information (if applicable)
Definition: REveGeomData.hxx:155
ROOT::Experimental::REveGeomDescription::SetMaxVisFaces
void SetMaxVisFaces(int cnt)
Set maximal number of faces which should be selected for drawing.
Definition: REveGeomData.hxx:244
ROOT::Experimental::REveGeomNodeInfo
Definition: REveGeomData.hxx:147
ROOT::Experimental::REveGeomDescription::ProduceModifyReply
std::string ProduceModifyReply(int nodeid)
Return string with only part of nodes description which were modified Checks also volume.
Definition: REveGeomData.cxx:1133
ROOT::Experimental::REveGeomNode
Full node description including matrices and other attributes.
Definition: REveGeomData.hxx:56
ROOT::Experimental::REveGeomNode::idshift
int idshift
! used to jump over then scan all geom hierarchy
Definition: REveGeomData.hxx:61
ROOT::Experimental::REveGeomConfig::maxnumfaces
int maxnumfaces
maximal number of faces
Definition: REveGeomData.hxx:119
ROOT::Experimental::REveGeomDescription::ShapeDescr::rndr_info
RGeomRenderInfo * rndr_info()
Provide render info for visible item.
Definition: REveGeomData.hxx:178
ROOT::Experimental::REveGeomNodeBase::IsVisible
bool IsVisible() const
Definition: REveGeomData.hxx:51
ROOT::Experimental::REveGeomConfig
Configuration parameters which can be configured on the client Send as is to-from client.
Definition: REveGeomData.hxx:115
ROOT::Experimental::REveGeomNodeBase::nochlds
bool nochlds
how far in hierarchy depth should be scanned
Definition: REveGeomData.hxx:44
ROOT::Experimental::RGeomRawRenderInfo::~RGeomRawRenderInfo
virtual ~RGeomRawRenderInfo()=default
ROOT::Experimental::REveGeomNodeBase::id
int id
node id, index in array
Definition: REveGeomData.hxx:40
ROOT::Experimental::REveGeomVisible
REveGeomVisible contains description of visible node It is path to the node plus reference to shape r...
Definition: REveGeomData.hxx:98
ROOT::Experimental::REveGeomDescription::MakeDrawingJson
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...
Definition: REveGeomData.cxx:1218
ROOT::Experimental::REveGeomDescription::HasDrawData
bool HasDrawData() const
Definition: REveGeomData.hxx:269
ROOT::Experimental::REveGeomDescription::ClearDrawData
void ClearDrawData()
Clear raw data. Will be rebuild when next connection will be established.
Definition: REveGeomData.cxx:817
ROOT::Experimental::REveGeomConfig::nsegm
int nsegm
number of segments for cylindrical shapes
Definition: REveGeomData.hxx:122
ROOT::Experimental::REveGeomDescription::fDesc
std::vector< REveGeomNode > fDesc
converted description, send to client
Definition: REveGeomData.hxx:194
ROOT::Experimental::REveGeomNodeInfo::shape_type
std::string shape_type
shape type (if any)
Definition: REveGeomData.hxx:152
ROOT::Experimental::REveGeomRequest::oper
std::string oper
operation like HIGHL or HOVER
Definition: REveGeomData.hxx:142
TGeoMatrix
Geometrical transformation package.
Definition: TGeoMatrix.h:41
ROOT::Experimental::RGeomShapeRenderInfo::shape
TGeoShape * shape
original shape - can be much less than binary data
Definition: REveGeomData.hxx:90
ROOT::Experimental::REveGeomDescription::MakeNodeInfo
std::unique_ptr< REveGeomNodeInfo > MakeNodeInfo(const std::string &path)
Change visibility for specified element Returns true if changes was performed.
Definition: REveGeomData.cxx:1273
ROOT::Experimental::REveGeomNode::REveGeomNode
REveGeomNode(int _id=0)
Definition: REveGeomData.hxx:65
ROOT::Experimental::REveGeomDescription::ChangeNodeVisibility
bool ChangeNodeVisibility(int nodeid, bool selected)
Change visibility for specified element Returns true if changes was performed.
Definition: REveGeomData.cxx:1242
ROOT::Experimental::REveGeomVisible::opacity
double opacity
opacity
Definition: REveGeomData.hxx:104
ROOT::Experimental::REveGeomDescription::FindShapeDescr
ShapeDescr & FindShapeDescr(TGeoShape *shape)
Find description object for requested shape If not exists - will be created.
Definition: REveGeomData.cxx:610
ROOT::Experimental::REveGeomDescription::ShapeDescr
Definition: REveGeomData.hxx:165
ROOT::Experimental::REveGeomDescription::MakeShapeDescr
ShapeDescr & MakeShapeDescr(TGeoShape *shape)
Find description object and create render information.
Definition: REveGeomData.cxx:626
ROOT::Experimental::REveGeomConfig::maxnumnodes
int maxnumnodes
maximal number of nodes
Definition: REveGeomData.hxx:118
ROOT::Experimental::REveGeomNodeInfo::node_name
std::string node_name
node name
Definition: REveGeomData.hxx:151
ROOT::Experimental::REveGeomDescription::SetVisLevel
void SetVisLevel(int lvl=3)
Set maximal visible level.
Definition: REveGeomData.hxx:250
ROOT::Experimental::RGeomRenderInfo::~RGeomRenderInfo
virtual ~RGeomRenderInfo()=default
virtual destructor required for the I/O
xmlio::cnt
const char * cnt
Definition: TXMLSetup.cxx:75
ROOT::Experimental::REveGeomDescription::PackMatrix
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...
Definition: REveGeomData.cxx:207
ROOT::Experimental::REveGeomConfig::vislevel
int vislevel
visible level
Definition: REveGeomData.hxx:117
ROOT::Experimental::REveGeomNode::useflag
bool useflag
! extra flag, used for selection
Definition: REveGeomData.hxx:62
TGeoManager
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::REveGeomDrawing::visibles
std::vector< REveGeomVisible > visibles
all visible items
Definition: REveGeomData.hxx:135
ROOT::Experimental::REveGeomNode::matr
std::vector< float > matr
matrix for the node, can have reduced number of elements
Definition: REveGeomData.hxx:58
TGeoVolume
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
ROOT::Experimental::REveGeomNode::CanDisplay
bool CanDisplay() const
True when there is shape and it can be displayed.
Definition: REveGeomData.hxx:68
ROOT::Experimental::REveGeomDescription::fSortMap
std::vector< int > fSortMap
! nodes in order large -> smaller volume
Definition: REveGeomData.hxx:196
ROOT::Experimental::RGeomShapeRenderInfo::~RGeomShapeRenderInfo
virtual ~RGeomShapeRenderInfo()=default
ROOT::Experimental::REveGeomDescription::GetNumNodes
int GetNumNodes() const
Number of unique nodes in the geometry.
Definition: REveGeomData.hxx:233
ROOT::Experimental::REveGeomDescription::fShapes
std::vector< ShapeDescr > fShapes
! shapes with created descriptions
Definition: REveGeomData.hxx:197
ROOT::Experimental::REveGeomVisible::ri
RGeomRenderInfo * ri
render information for the shape, can be same for different nodes
Definition: REveGeomData.hxx:105
ROOT::Experimental::REveGeomDescription::fPreferredOffline
bool fPreferredOffline
! indicates that full description should be provided to client
Definition: REveGeomData.hxx:202