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 {
60  };
61 
62  FWGeoTopNode(const char* n = "FWGeoTopNode", const char* t = "FWGeoTopNode"){}
63  virtual ~FWGeoTopNode(){}
64 
65  virtual void Paint(Option_t* option="");
67 
68  virtual FWGeometryTableManagerBase* tableManager() { return 0; }
69  virtual FWGeometryTableViewBase* browser() { return 0; }
70 
71  std::set<TGLPhysicalShape*> fHted;
72  std::set<TGLPhysicalShape*> fSted;
73 
75  bool selectPhysicalFromTable(int);
76  void clearSelection() {fHted.clear(); fSted.clear();}
77 
78  void printSelected();
79  virtual void popupMenu(int x, int y, TGLViewer*) {}
80 
81  virtual void UnSelected();
82  virtual void UnHighlighted();
83 
84  static TGLVector3 s_pickedCamera3DCenter;
85  static TGLViewer* s_pickedViewer;
86 
87 protected:
88  static UInt_t phyID(int tableIdx);
89  static int tableIdx(TGLPhysicalShape* ps);
90 
91  void ProcessSelection(TGLSelectRecord& rec, std::set<TGLPhysicalShape*>& sset, TGLPhysicalShape* id);
92 
93  void EraseFromSet(std::set<TGLPhysicalShape*>& sset, TGLPhysicalShape* id);
94  void ClearSet(std::set<TGLPhysicalShape*>& sset);
95 
96  void SetStateOf(TGLPhysicalShape* id);
97 
98 
99  void setupBuffMtx(TBuffer3D& buff, const TGeoHMatrix& mat);
100 
101  FWPopupMenu* setPopupMenu(int iX, int iY, TGLViewer* v, bool);
102 
103 
104  void paintShape(Int_t idx, const TGeoHMatrix& nm, bool volumeColor, bool parentNode);
105  virtual void ComputeBBox();
106 private:
107  FWGeoTopNode(const FWGeoTopNode&); // stop default
108  const FWGeoTopNode& operator=(const FWGeoTopNode&); // stop default
109 #ifndef __CINT__
111 #endif
112 
113 
115 };
116 
117 
118 #endif
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:72
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:68
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:71
virtual ~FWGeoTopNode()
Definition: FWGeoTopNode.h:63
virtual void Paint(Option_t *option="")
void printSelected()
int getFirstSelectedTableIndex()
void clearSelection()
Definition: FWGeoTopNode.h:76
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:66
UChar_t wrapTransparency(FWGeometryTableManagerBase::NodeInfo &data, bool leafNode)
virtual void popupMenu(int x, int y, TGLViewer *)
Definition: FWGeoTopNode.h:79
virtual void ComputeBBox()
FWGeoTopNode(const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
Definition: FWGeoTopNode.h:62
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:69
bool selectPhysicalFromTable(int)
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:85
const FWGeoTopNode & operator=(const FWGeoTopNode &)
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:71
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
Definition: DDAxes.h:10
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
virtual void UnSelected()
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:84
void setupBuffMtx(TBuffer3D &buff, const TGeoHMatrix &mat)
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:53