CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Fireworks/Core/src/vis_macros.h

Go to the documentation of this file.
00001 #ifndef vis_macros_h
00002 #define vis_macros_h
00003 
00004 #include <vector>
00005 #include <string>
00006 #include <Rtypes.h>
00007 class TEveElement;
00008 
00009 // get the named from an object derived from both TEveElement and TNamed
00010 const char* get_name( const TEveElement * element );
00011 
00012 // force a node to expand its internal reprsentation, so all children are actually present
00013 void expand_node( TEveElement * element );
00014 
00015 // retrieve a TShape from a TEveElement
00016 const TGeoShape * get_shape( const TEveElement * element );
00017 
00018 // overloaded non-const TShape retrieval, allowed from a TGeoShape only
00019 TGeoShape * get_shape( TEveElement * element );
00020 
00021 // set an element's color and alpha, and possibly its children's up to levels levels deep
00022 void set_color( TEveElement * element, Color_t color, float alpha = 1.0, unsigned int levels = 0 );
00023 
00024 // check if a node has any children or if it's a leaf node
00025 bool is_leaf_node( const TEveElement * element );
00026 
00027 // toggle an elements's children visibility, based on their name
00028 // names are checked only up to their length, so for example tec:TEC will match both tec:TEC_1 and tec:TEC_2
00029 void set_children_visibility( TEveElement * element, const std::string & node_name, const std::vector<std::string> & children_name, bool visibility );
00030 
00031 // set Tracker's Endcaps visibility
00032 void set_tracker_endcap_visibility( TEveElement * tracker, bool visibility );
00033 
00034 // show Tracker's Endcaps
00035 void show_tracker_endcap( TEveElement * tracker );
00036 
00037 // hide Tracker's Endcaps
00038 void hide_tracker_endcap( TEveElement * tracker );
00039 
00040 #endif // vis_macros_h