Definition at line 161 of file REveGeomData.hxx.
Classes | |
class | ShapeDescr |
Public Member Functions | |
REveGeomDescription ()=default | |
void | Build (TGeoManager *mgr, const std::string &volname="") |
Collect information about geometry hierarchy into flat list like it done JSROOT.GEO.ClonedNodes.prototype.CreateClones. | |
bool | ChangeConfiguration (const std::string &json) |
Change configuration by client Returns true if any parameter was really changed. | |
bool | ChangeNodeVisibility (int nodeid, bool selected) |
Change visibility for specified element Returns true if changes was performed. | |
void | ClearDrawData () |
Clear raw data. Will be rebuild when next connection will be established. | |
bool | CollectVisibles () |
Collect all information required to draw geometry on the client This includes list of each visible nodes, meshes and matrixes. | |
int | FindNodeId (const std::vector< int > &stack) |
Returns nodeid for given stack array, returns -1 in case of failure. | |
const std::string & | GetDrawJson () const |
std::string | GetDrawOptions () const |
Returns draw options, used for JSROOT TGeoPainter. | |
int | GetJsonComp () const |
Returns JSON compression level for data transfer. | |
int | GetMaxVisFaces () const |
Returns maximal visible number of faces, ignored when non-positive. | |
int | GetMaxVisNodes () const |
Returns maximal visible number of nodes, ignored when non-positive. | |
int | GetNSegments () const |
Return of segments for cylindrical shapes, if 0 - default value will be used. | |
int | GetNumNodes () const |
Number of unique nodes in the geometry. | |
int | GetVisLevel () const |
Returns maximal visible level. | |
bool | HasDrawData () const |
bool | IsBuild () const |
int | IsBuildShapes () const |
Returns true if binary 3D model build already by C++ server (default) | |
bool | IsPreferredOffline () const |
Is offline operations preferred. | |
bool | IsPrincipalEndNode (int nodeid) |
return true when node used in main geometry drawing and does not have childs for such nodes one could provide optimize toggling of visibility flags | |
std::vector< int > | MakeIdsByStack (const std::vector< int > &stack) |
Produce list of node ids for given stack If found nodes preselected - use their ids. | |
std::unique_ptr< REveGeomNodeInfo > | MakeNodeInfo (const std::vector< std::string > &path) |
Change visibility for specified element Returns true if changes was performed. | |
std::vector< std::string > | MakePathByStack (const std::vector< int > &stack) |
Returns path string for provided stack. | |
std::vector< int > | MakeStackByIds (const std::vector< int > &ids) |
Creates stack for given array of ids, first element always should be 0. | |
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 | ProcessBrowserRequest (const std::string &req="") |
Find description object for requested shape If not exists - will be created. | |
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 transferred Returns true if new render information provided. | |
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 and shapes for them Returns number of match elements. | |
void | SetBuildShapes (int lvl=1) |
Instruct to build binary 3D model already on the server (true) or send TGeoShape as is to client, which can build model itself. | |
void | SetDrawOptions (const std::string &opt="") |
Set draw options as string for JSROOT TGeoPainter. | |
void | SetJsonComp (int comp=0) |
Set JSON compression level for data transfer. | |
void | SetMaxVisFaces (int cnt) |
Set maximal number of faces which should be selected for drawing. | |
void | SetMaxVisNodes (int cnt) |
Set maximal number of nodes which should be selected for drawing. | |
void | SetNSegments (int n=0) |
Set number of segments for cylindrical shapes, if 0 - default value will be used. | |
void | SetPreferredOffline (bool on) |
Set preference of offline operations. | |
void | SetVisLevel (int lvl=3) |
Set maximal visible level. | |
Private Member Functions | |
void | CollectNodes (REveGeomDrawing &drawing) |
Collect nodes which are used in visibles. | |
void | CopyMaterialProperties (TGeoVolume *vol, REveGeomNode &node) |
Copy material properties. | |
ShapeDescr & | FindShapeDescr (TGeoShape *shape) |
Find description object for requested shape If not exists - will be created. | |
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 this case one can exclude several classes which are not interesting, but appears very often. | |
ShapeDescr & | MakeShapeDescr (TGeoShape *shape) |
Find description object and create render information. | |
int | MarkVisible (bool on_screen=false) |
Set visibility flag for each nodes. | |
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 - Identity matrix 3 - Translation 4 - Scale (last element always 1) 9 - Rotation 16 - Full size. | |
void | ProduceIdShifts () |
Count total number of visible childs under each node. | |
void | ResetRndrInfos () |
Reset shape info, which used to pack binary data. | |
int | ScanNodes (bool only_visible, int maxlvl, REveGeomScanFunc_t func) |
Iterate over all nodes and call function for visible. | |
Private Attributes | |
int | fActualLevel {0} |
! level can be reduced when selecting nodes | |
REveGeomConfig | fCfg |
! configuration parameter editable from GUI | |
std::vector< REveGeomNode > | fDesc |
converted description, send to client | |
int | fDrawIdCut {0} |
! sortid used for selection of most-significant nodes | |
std::string | fDrawJson |
! JSON with main nodes drawn by client | |
int | fJsonComp {0} |
! default JSON compression | |
std::vector< TGeoNode * > | fNodes |
! flat list of all nodes | |
bool | fPreferredOffline {false} |
! indicates that full description should be provided to client | |
std::vector< ShapeDescr > | fShapes |
! shapes with created descriptions | |
std::vector< int > | fSortMap |
! nodes in order large -> smaller volume | |
Friends | |
class | RGeomBrowserIter |
#include <ROOT/REveGeomData.hxx>
|
default |
void ROOT::Experimental::REveGeomDescription::Build | ( | TGeoManager * | mgr, |
const std::string & | volname = "" |
||
) |
Collect information about geometry hierarchy into flat list like it done JSROOT.GEO.ClonedNodes.prototype.CreateClones.
Definition at line 305 of file REveGeomData.cxx.
bool ROOT::Experimental::REveGeomDescription::ChangeConfiguration | ( | const std::string & | json | ) |
Change configuration by client Returns true if any parameter was really changed.
Definition at line 1327 of file REveGeomData.cxx.
Change visibility for specified element Returns true if changes was performed.
Definition at line 1256 of file REveGeomData.cxx.
void ROOT::Experimental::REveGeomDescription::ClearDrawData | ( | ) |
Clear raw data. Will be rebuild when next connection will be established.
Definition at line 842 of file REveGeomData.cxx.
|
private |
Collect nodes which are used in visibles.
Definition at line 524 of file REveGeomData.cxx.
bool ROOT::Experimental::REveGeomDescription::CollectVisibles | ( | ) |
Collect all information required to draw geometry on the client This includes list of each visible nodes, meshes and matrixes.
Definition at line 746 of file REveGeomData.cxx.
|
private |
Copy material properties.
Definition at line 703 of file REveGeomData.cxx.
Returns nodeid for given stack array, returns -1 in case of failure.
Definition at line 1032 of file REveGeomData.cxx.
|
private |
Find description object for requested shape If not exists - will be created.
Definition at line 635 of file REveGeomData.cxx.
|
inline |
Definition at line 270 of file REveGeomData.hxx.
|
inline |
Returns draw options, used for JSROOT TGeoPainter.
Definition at line 304 of file REveGeomData.hxx.
|
inline |
Returns JSON compression level for data transfer.
Definition at line 299 of file REveGeomData.hxx.
|
inline |
Returns maximal visible number of faces, ignored when non-positive.
Definition at line 247 of file REveGeomData.hxx.
|
inline |
Returns maximal visible number of nodes, ignored when non-positive.
Definition at line 241 of file REveGeomData.hxx.
|
inline |
Return of segments for cylindrical shapes, if 0 - default value will be used.
Definition at line 294 of file REveGeomData.hxx.
|
inline |
Number of unique nodes in the geometry.
Definition at line 233 of file REveGeomData.hxx.
|
inline |
Returns maximal visible level.
Definition at line 253 of file REveGeomData.hxx.
|
inline |
Definition at line 269 of file REveGeomData.hxx.
|
inline |
Definition at line 235 of file REveGeomData.hxx.
|
inline |
Returns true if binary 3D model build already by C++ server (default)
Definition at line 309 of file REveGeomData.hxx.
|
inline |
Is offline operations preferred.
After get full description, client can do most operations without extra requests
Definition at line 261 of file REveGeomData.hxx.
return true when node used in main geometry drawing and does not have childs for such nodes one could provide optimize toggling of visibility flags
Definition at line 851 of file REveGeomData.cxx.
|
private |
Produce JSON for the drawing If TGeoShape appears in the drawing, one has to keep typeinfo But in this case one can exclude several classes which are not interesting, but appears very often.
Definition at line 1232 of file REveGeomData.cxx.
std::vector< int > ROOT::Experimental::REveGeomDescription::MakeIdsByStack | ( | const std::vector< int > & | stack | ) |
Produce list of node ids for given stack If found nodes preselected - use their ids.
Definition at line 1103 of file REveGeomData.cxx.
std::unique_ptr< ROOT::Experimental::REveGeomNodeInfo > ROOT::Experimental::REveGeomDescription::MakeNodeInfo | ( | const std::vector< std::string > & | path | ) |
Change visibility for specified element Returns true if changes was performed.
Definition at line 1287 of file REveGeomData.cxx.
std::vector< std::string > ROOT::Experimental::REveGeomDescription::MakePathByStack | ( | const std::vector< int > & | stack | ) |
Returns path string for provided stack.
Definition at line 1131 of file REveGeomData.cxx.
|
private |
Find description object and create render information.
Definition at line 651 of file REveGeomData.cxx.
std::vector< int > ROOT::Experimental::REveGeomDescription::MakeStackByIds | ( | const std::vector< int > & | ids | ) |
Creates stack for given array of ids, first element always should be 0.
Definition at line 1048 of file REveGeomData.cxx.
std::vector< int > ROOT::Experimental::REveGeomDescription::MakeStackByPath | ( | const std::vector< std::string > & | path | ) |
Produce stack based on string path Used to highlight geo volumes by browser hover event.
Definition at line 1087 of file REveGeomData.cxx.
Set visibility flag for each nodes.
Definition at line 417 of file REveGeomData.cxx.
|
private |
Pack matrix into vector, which can be send to client Following sizes can be used for vector: 0 - Identity matrix 3 - Translation 4 - Scale (last element always 1) 9 - Rotation 16 - Full size.
Definition at line 231 of file REveGeomData.cxx.
std::string ROOT::Experimental::REveGeomDescription::ProcessBrowserRequest | ( | const std::string & | req = "" | ) |
Find description object for requested shape If not exists - will be created.
Definition at line 561 of file REveGeomData.cxx.
bool ROOT::Experimental::REveGeomDescription::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 transferred Returns true if new render information provided.
Definition at line 1169 of file REveGeomData.cxx.
|
private |
Count total number of visible childs under each node.
Definition at line 450 of file REveGeomData.cxx.
std::string ROOT::Experimental::REveGeomDescription::ProduceModifyReply | ( | int | nodeid | ) |
Return string with only part of nodes description which were modified Checks also volume.
Definition at line 1147 of file REveGeomData.cxx.
|
private |
Reset shape info, which used to pack binary data.
Definition at line 736 of file REveGeomData.cxx.
|
private |
Iterate over all nodes and call function for visible.
Definition at line 474 of file REveGeomData.cxx.
int ROOT::Experimental::REveGeomDescription::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 and shapes for them Returns number of match elements.
Definition at line 867 of file REveGeomData.cxx.
Instruct to build binary 3D model already on the server (true) or send TGeoShape as is to client, which can build model itself.
Definition at line 307 of file REveGeomData.hxx.
|
inline |
Set draw options as string for JSROOT TGeoPainter.
Definition at line 302 of file REveGeomData.hxx.
Set JSON compression level for data transfer.
Definition at line 297 of file REveGeomData.hxx.
Set maximal number of faces which should be selected for drawing.
Definition at line 244 of file REveGeomData.hxx.
Set maximal number of nodes which should be selected for drawing.
Definition at line 238 of file REveGeomData.hxx.
Set number of segments for cylindrical shapes, if 0 - default value will be used.
Definition at line 292 of file REveGeomData.hxx.
Set preference of offline operations.
Server provides more info to client from the begin on to avoid communication
Definition at line 257 of file REveGeomData.hxx.
Set maximal visible level.
Definition at line 250 of file REveGeomData.hxx.
|
friend |
Definition at line 163 of file REveGeomData.hxx.
|
private |
! level can be reduced when selecting nodes
Definition at line 201 of file REveGeomData.hxx.
|
private |
! configuration parameter editable from GUI
Definition at line 205 of file REveGeomData.hxx.
|
private |
converted description, send to client
Definition at line 194 of file REveGeomData.hxx.
|
private |
! sortid used for selection of most-significant nodes
Definition at line 200 of file REveGeomData.hxx.
|
private |
! JSON with main nodes drawn by client
Definition at line 199 of file REveGeomData.hxx.
|
private |
! default JSON compression
Definition at line 203 of file REveGeomData.hxx.
|
private |
! flat list of all nodes
Definition at line 193 of file REveGeomData.hxx.
|
private |
! indicates that full description should be provided to client
Definition at line 202 of file REveGeomData.hxx.
|
private |
! shapes with created descriptions
Definition at line 197 of file REveGeomData.hxx.
|
private |
! nodes in order large -> smaller volume
Definition at line 196 of file REveGeomData.hxx.