CMS 3D CMS Logo

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