Definition at line 28 of file RGeomViewer.hxx.
Public Member Functions | |
RGeomViewer (TGeoManager *mgr=nullptr, const std::string &volname="") | |
constructor | |
virtual | ~RGeomViewer () |
destructor | |
bool | GetShowHierarchy () const |
Returns default hierarchy browser visibility. | |
const std::string & | GetTitle () const |
std::string | GetWindowAddr () const |
Return URL address of web window used for geometry viewer. | |
void | SaveImage (const std::string &fname="geometry.png", int width=0, int height=0) |
Produce PNG image of the geometry If web-browser is shown and drawing completed, image is requested from the browser. | |
void | SelectVolume (const std::string &volname) |
Select visible top volume, all other volumes will be disabled. | |
void | SetDrawOptions (const std::string &opt) |
Configures draw option for geometry Normally has effect before first drawing of the geometry When geometry displayed, only "axis" and "rotate" options are updated. | |
void | SetGeometry (TGeoManager *mgr, const std::string &volname="") |
assign new geometry to the viewer | |
void | SetLimits (int nnodes=5000, int nfaces=100000) |
Configures maximal number of visible nodes and faces. | |
void | SetOnlyVolume (TGeoVolume *vol) |
Draw only specified volume, special case when volume stored without valid geomanager. | |
void | SetShowHierarchy (bool on=true) |
Configures default hierarchy browser visibility, only has effect before showing web window. | |
void | SetTitle (const std::string &title) |
void | SetTopVisible (bool on=true) |
void | SetVisLevel (int lvl=3) |
Configures maximal visible level. | |
void | Show (const RWebDisplayArgs &args="", bool always_start_new_browser=false) |
Show or update geometry in web window If web browser already started - just refresh drawing like "reload" button does If no web window exists or. | |
void | Update () |
Update geometry drawings in all web displays. | |
Protected Member Functions | |
std::vector< int > | GetStackFromJson (const std::string &json, bool node_ids=false) |
convert JSON into stack array | |
void | SendGeometry (unsigned connid) |
Send data for principal geometry draw. | |
void | WebWindowCallback (unsigned connid, const std::string &arg) |
receive data from client | |
Protected Attributes | |
RGeomDescription | fDesc |
! geometry description, send to the client as first message | |
TGeoManager * | fGeoManager {nullptr} |
! geometry to show | |
std::string | fSelectedVolume |
! name of selected volume | |
bool | fShowHierarchy {true} |
! if hierarchy visible by default | |
std::string | fTitle |
! title of geometry viewer | |
std::shared_ptr< RWebWindow > | fWebWindow |
! web window to show geometry | |
#include <ROOT/RGeomViewer.hxx>
RGeomViewer::RGeomViewer | ( | TGeoManager * | mgr = nullptr , |
const std::string & | volname = "" |
||
) |
constructor
Definition at line 34 of file RGeomViewer.cxx.
|
virtual |
destructor
Definition at line 57 of file RGeomViewer.cxx.
|
inline |
Returns default hierarchy browser visibility.
Definition at line 84 of file RGeomViewer.hxx.
|
protected |
convert JSON into stack array
Definition at line 140 of file RGeomViewer.cxx.
|
inline |
Definition at line 52 of file RGeomViewer.hxx.
std::string RGeomViewer::GetWindowAddr | ( | ) | const |
Return URL address of web window used for geometry viewer.
Definition at line 123 of file RGeomViewer.cxx.
void RGeomViewer::SaveImage | ( | const std::string & | fname = "geometry.png" , |
int | width = 0 , |
||
int | height = 0 |
||
) |
Produce PNG image of the geometry If web-browser is shown and drawing completed, image is requested from the browser.
In this case method executed asynchronously - it returns immediately and image will stored shortly afterwards when received from the client Height and width parameters are ignored in that case and derived from actual drawing size in the browser. Another possibility is to invoke headless browser, providing positive width and height parameter explicitely
Definition at line 193 of file RGeomViewer.cxx.
void RGeomViewer::SelectVolume | ( | const std::string & | volname | ) |
Select visible top volume, all other volumes will be disabled.
Definition at line 77 of file RGeomViewer.cxx.
|
protected |
Send data for principal geometry draw.
Definition at line 158 of file RGeomViewer.cxx.
void RGeomViewer::SetDrawOptions | ( | const std::string & | opt | ) |
Configures draw option for geometry Normally has effect before first drawing of the geometry When geometry displayed, only "axis" and "rotate" options are updated.
Definition at line 176 of file RGeomViewer.cxx.
void RGeomViewer::SetGeometry | ( | TGeoManager * | mgr, |
const std::string & | volname = "" |
||
) |
assign new geometry to the viewer
Definition at line 64 of file RGeomViewer.cxx.
Configures maximal number of visible nodes and faces.
Definition at line 63 of file RGeomViewer.hxx.
void RGeomViewer::SetOnlyVolume | ( | TGeoVolume * | vol | ) |
Draw only specified volume, special case when volume stored without valid geomanager.
Definition at line 86 of file RGeomViewer.cxx.
|
inline |
Configures default hierarchy browser visibility, only has effect before showing web window.
Definition at line 81 of file RGeomViewer.hxx.
|
inline |
Definition at line 51 of file RGeomViewer.hxx.
|
inline |
Definition at line 75 of file RGeomViewer.hxx.
|
inline |
Configures maximal visible level.
Definition at line 70 of file RGeomViewer.hxx.
void RGeomViewer::Show | ( | const RWebDisplayArgs & | args = "" , |
bool | always_start_new_browser = false |
||
) |
Show or update geometry in web window If web browser already started - just refresh drawing like "reload" button does If no web window exists or.
always_start_new_browser | configured, starts new window |
args | arguments to display |
Definition at line 102 of file RGeomViewer.cxx.
void RGeomViewer::Update | ( | ) |
Update geometry drawings in all web displays.
Definition at line 131 of file RGeomViewer.cxx.
|
protected |
receive data from client
Definition at line 220 of file RGeomViewer.cxx.
|
protected |
! geometry description, send to the client as first message
Definition at line 34 of file RGeomViewer.hxx.
|
protected |
! geometry to show
Definition at line 32 of file RGeomViewer.hxx.
|
protected |
! name of selected volume
Definition at line 33 of file RGeomViewer.hxx.
|
protected |
! if hierarchy visible by default
Definition at line 35 of file RGeomViewer.hxx.
|
protected |
! title of geometry viewer
Definition at line 36 of file RGeomViewer.hxx.
|
protected |
! web window to show geometry
Definition at line 38 of file RGeomViewer.hxx.