CMS 3D CMS Logo

VisG4TwigOps.h

Go to the documentation of this file.
00001 #ifndef VIS_G4_VOLUMES_VIS_G4_TWIG_OPS_H
00002 # define VIS_G4_VOLUMES_VIS_G4_TWIG_OPS_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "VisGeant4/VisG4Volumes/interface/config.h"
00007 # include <qobject.h>
00008 # include <string>
00009 # include <set>
00010 
00011 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00012 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00013 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00014 
00015 class VisG4VolumeTwig;
00016 class IgQtObjectMenu;
00017 class IgQtObjectMenuMessage;
00018 class G4Material;
00019 class G4VisAttributes;
00020 class G4LogicalVolume;
00021 class G4VSolid;
00022 
00023 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00024 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00025 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00026 
00028 class VIS_G4_VOLUMES_API VisG4TwigOps : public QObject
00029 {
00030     Q_OBJECT
00031 public:
00032     static const int MENU_LOGICAL               = 3;
00033     static const int MENU_GET_MASS              = 4;
00034 
00035     static const int MENU_SHOW_CATEGORY         = 20;
00036     static const int MENU_SHOW_MATERIAL         = 21;
00037 
00038     static const int MENU_HIDE_CATEGORY         = 60;
00039     static const int MENU_HIDE_MATERIAL         = 61;
00040 
00041     static const int MENU_RENDER_SEP            = 80;
00042     static const int MENU_APPEARANCE            = 81;
00043     static const int MENU_RENDER                = 82;
00044     static const int MENU_RENDER_AS_IS          = 8200;
00045     static const int MENU_RENDER_SOLID          = 8201;
00046     static const int MENU_RENDER_WIREFRAME      = 8202;
00047     static const int MENU_RENDER_ALL            = 83;
00048     static const int MENU_COLOUR                = 84;
00049     static const int MENU_TRANSPARENCY          = 85;
00050 
00051     static const int CAT_SENSITIVE              = 2001;
00052     static const int CAT_INSENSITIVE            = 2002;
00053     static const int CAT_BEAMPIPE               = 2003;
00054     static const int CAT_CABLE                  = 2004;
00055     static const int CAT_COOLING                = 2005;
00056     static const int CAT_MAGNET                 = 2006;
00057     static const int CAT_SUPPORT                = 2007;
00058     static const int CAT_SENSITIVE_CONT         = 2008;
00059     static const int CAT_FILTER                 = 2009;
00060 
00061 
00062     // implicit constructor
00063     // implicit destructor
00064     // implicit copy constructor
00065     // implicit assignment operator
00066 
00067     void                menuAction (IgQtObjectMenuMessage message);
00068     void                menuUpdate (void);
00069 
00070 public slots:
00071     void                actionLogical (int id);
00072     void                actionGetMass (int id);
00073     void                actionShowCategory (int id);
00074     void                actionHideCategory (int id);
00075     void                actionShowMaterial (int id);
00076     void                actionRender (int id);
00077     void                actionRenderAll (int id);
00078     void                actionColour (int id);
00079     void                actionTransparency (int id);
00080     void                actionApplyFilter (int id);    
00081     void                actionAppearance (int id);    
00082 
00083 private:
00084     void                doGetMass (int id, VisG4VolumeTwig *twig);
00085 
00086     double              getMass (G4LogicalVolume *volume, G4Material *material);
00087     double              estimateCubicVolume (G4VSolid *solid);
00088     
00089     void                doShowCategory (bool show, int id, VisG4VolumeTwig *twig);
00090     void                doShowMaterial (bool show, VisG4VolumeTwig *twig);
00091     void                doRender (int id, VisG4VolumeTwig *twig, bool recurse);
00092     void                doApplyFilter (bool show, int id, VisG4VolumeTwig *twig);    
00093 
00094     VisG4VolumeTwig             *m_twig;
00095     IgQtObjectMenu              *m_menu;
00096     std::set<std::string>       m_selected;
00097     std::set<G4VisAttributes *> m_changed;
00098 };
00099 
00100 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00101 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00102 
00103 #endif // VIS_G4_VOLUMES_VIS_G4_TWIG_OPS_H

Generated on Tue Jun 9 17:50:06 2009 for CMSSW by  doxygen 1.5.4