CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWGeoTopNode.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_FWGeoTopNode_h
2 #define Fireworks_Core_FWGeoTopNode_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : FWGeoTopNode
7 //
16 //
17 // Original Author: Matevz Tadel, Alja Mrak Tadel
18 // Created: Thu Jun 23 01:25:00 CEST 2011
19 //
20 
21 #ifndef __CINT__
23 #endif
24 #include "TEveElement.h"
25 #include "TAttBBox.h"
26 #include "TGLUtil.h"
27 #include <set>
28 
29 class TGeoHMatrix;
30 class TGLPhysicalShape;
31 class TGLSelectRecord;
32 class TGLViewer;
33 
35 class FWOverlapTableView;
36 class TBuffer3D;
37 class TGeoNode;
39 class FWPopupMenu;
40 
41 class FWGeoTopNode : public TEveElementList,
42  public TAttBBox
43 {
44  friend class FWGeoTopNodeGL;
45 public:
46 
47  enum MenuOptions {
62  };
63 
64  FWGeoTopNode(const char* n = "FWGeoTopNode", const char* t = "FWGeoTopNode"){}
65  virtual ~FWGeoTopNode(){}
66 
67  virtual void Paint(Option_t* option="");
69 
70  virtual FWGeometryTableManagerBase* tableManager() { return 0; }
71  virtual FWGeometryTableViewBase* browser() { return 0; }
72 
73  std::set<TGLPhysicalShape*> fHted;
74  std::set<TGLPhysicalShape*> fSted;
75 
77  bool selectPhysicalFromTable(int);
78  void clearSelection() {fHted.clear(); fSted.clear();}
79 
80  void printSelected();
81  virtual void popupMenu(int x, int y, TGLViewer*) {}
82 
83  virtual void UnSelected();
84  virtual void UnHighlighted();
85 
86  static TGLVector3 s_pickedCamera3DCenter;
87  static TGLViewer* s_pickedViewer;
88 
89 protected:
90  static UInt_t phyID(int tableIdx);
91  static int tableIdx(TGLPhysicalShape* ps);
92 
93  void ProcessSelection(TGLSelectRecord& rec, std::set<TGLPhysicalShape*>& sset, TGLPhysicalShape* id);
94 
95  void EraseFromSet(std::set<TGLPhysicalShape*>& sset, TGLPhysicalShape* id);
96  void ClearSet(std::set<TGLPhysicalShape*>& sset);
97 
98  void SetStateOf(TGLPhysicalShape* id);
99 
100 
101  void setupBuffMtx(TBuffer3D& buff, const TGeoHMatrix& mat);
102 
103  FWPopupMenu* setPopupMenu(int iX, int iY, TGLViewer* v, bool);
104 
105 
106  void paintShape(Int_t idx, const TGeoHMatrix& nm, bool volumeColor, bool parentNode);
107  virtual void ComputeBBox();
108 private:
109  FWGeoTopNode(const FWGeoTopNode&); // stop default
110  const FWGeoTopNode& operator=(const FWGeoTopNode&); // stop default
111 #ifndef __CINT__
113 #endif
114 
115 
117 };
118 
119 
120 #endif
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:71
virtual ~FWGeoTopNode()
Definition: FWGeoTopNode.h:65
virtual void Paint(Option_t *option="")
void printSelected()
int getFirstSelectedTableIndex()
void clearSelection()
Definition: FWGeoTopNode.h:78
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:68
UChar_t wrapTransparency(FWGeometryTableManagerBase::NodeInfo &data, bool leafNode)
virtual void popupMenu(int x, int y, TGLViewer *)
Definition: FWGeoTopNode.h:81
virtual void ComputeBBox()
FWGeoTopNode(const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
Definition: FWGeoTopNode.h:64
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
virtual FWGeometryTableViewBase * browser()
Definition: FWGeoTopNode.h:71
bool selectPhysicalFromTable(int)
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:87
const FWGeoTopNode & operator=(const FWGeoTopNode &)
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:73
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual void UnHighlighted()
void EraseFromSet(std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:64
void ProcessSelection(TGLSelectRecord &rec, std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
ClassDef(FWGeoTopNode, 0)
void SetStateOf(TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:81
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
virtual void UnSelected()
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:86
void setupBuffMtx(TBuffer3D &buff, const TGeoHMatrix &mat)
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:53