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
FWGeoTopNode::kApplyChldColRec
Definition: FWGeoTopNode.h:52
DDAxes::y
FWGeoTopNode::ClearSet
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:63
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
FWGeoTopNode::tableIdx
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:55
FWGeoTopNode::ComputeBBox
void ComputeBBox() override
Definition: FWGeoTopNode.cc:180
FWGeoTopNode::getFirstSelectedTableIndex
int getFirstSelectedTableIndex()
Definition: FWGeoTopNode.cc:164
FWGeoTopNode::UnHighlighted
void UnHighlighted() override
Definition: FWGeoTopNode.cc:327
FWGeoTopNode::kVisChldOff
Definition: FWGeoTopNode.h:50
FWGeoTopNode::clearSelection
void clearSelection()
Definition: FWGeoTopNode.h:76
FWGeoTopNode::wrapTransparency
UChar_t wrapTransparency(FWGeometryTableManagerBase::NodeInfo &data, bool leafNode)
Definition: FWGeoTopNode.cc:382
DDAxes::x
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWGeometryTableManagerBase.h
FWGeoTopNode::kVisChldOn
Definition: FWGeoTopNode.h:49
training_settings.idx
idx
Definition: training_settings.py:16
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
FWGeoTopNode::kSetTopNodeCam
Definition: FWGeoTopNode.h:47
FWGeometryTableManagerBase
Definition: FWGeometryTableManagerBase.h:36
FWGeoTopNode::kPrintPath
Definition: FWGeoTopNode.h:55
FWGeoTopNode::tableManager
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:68
FWGeoTopNode::popupMenu
virtual void popupMenu(int x, int y, TGLViewer *)
Definition: FWGeoTopNode.h:82
FWGeometryTableView
Definition: FWGeometryTableView.h:28
FWGeoTopNode::kApplyChldCol
Definition: FWGeoTopNode.h:51
FWGeometryTableViewBase
Definition: FWGeometryTableViewBase.h:41
FWGeoTopNodeGL
Definition: FWGeoTopNodeGL.h:7
OrderedSet.t
t
Definition: OrderedSet.py:90
FWGeoTopNode::printSelected
void printSelected()
Definition: FWGeoTopNode.cc:156
FWGeoTopNode::kPrintOverlap
Definition: FWGeoTopNode.h:57
FWGeoTopNode::kOverlapVisibilityMotherOff
Definition: FWGeoTopNode.h:59
FWGeoTopNode::browser
virtual FWGeometryTableViewBase * browser()
Definition: FWGeoTopNode.h:69
FWGeoTopNode::kOverlapVisibilityMotherOn
Definition: FWGeoTopNode.h:58
FWGeoTopNode::s_pickedViewer
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:88
FWGeoTopNode::UnSelected
void UnSelected() override
Definition: FWGeoTopNode.cc:318
FWPopupMenu
Definition: FWPopupMenu.cc:5
FWGeoTopNode::m_scene
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:66
FWGeoTopNode::EraseFromSet
void EraseFromSet(std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:57
FWGeoTopNode::ProcessSelection
void ProcessSelection(TGLSelectRecord &rec, std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:88
FWGeoTopNode::paintShape
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
Definition: FWGeoTopNode.cc:213
FWGeoTopNode::ClassDefOverride
ClassDefOverride(FWGeoTopNode, 0)
FWGeoTopNode::kPrintMaterial
Definition: FWGeoTopNode.h:54
FWGeoTopNode::MenuOptions
MenuOptions
Definition: FWGeoTopNode.h:45
FWGeometryTableManagerBase::NodeInfo
Definition: FWGeometryTableManagerBase.h:52
FWGeoTopNode::SetStateOf
void SetStateOf(TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:71
FWGeoTopNode::~FWGeoTopNode
~FWGeoTopNode() override
Definition: FWGeoTopNode.h:63
FWGeoTopNode::s_pickedCamera3DCenter
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:87
FWGeoTopNode::phyID
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:53
FWGeoTopNode
Definition: FWGeoTopNode.h:41
FWGeoTopNode::FWGeoTopNode
FWGeoTopNode(const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
Definition: FWGeoTopNode.h:62
FWGeoTopNode::setupBuffMtx
void setupBuffMtx(TBuffer3D &buff, const TGeoHMatrix &mat)
Definition: FWGeoTopNode.cc:187
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
FWGeoTopNode::setPopupMenu
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
Definition: FWGeoTopNode.cc:336
FWGeoTopNode::fSted
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:72
FWGeoTopNode::kCamera
Definition: FWGeoTopNode.h:53
FWGeoTopNodeGLScene
Definition: FWGeoTopNodeScene.h:9
FWGeoTopNode::operator=
const FWGeoTopNode & operator=(const FWGeoTopNode &)
FWGeoTopNode::selectPhysicalFromTable
bool selectPhysicalFromTable(int)
Definition: FWGeoTopNode.cc:141
FWGeoTopNode::fHted
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:71
FWGeoTopNode::kSetTopNode
Definition: FWGeoTopNode.h:46
FWGeoTopNode::Paint
void Paint(Option_t *option="") override
Definition: FWGeoTopNode.cc:294
FWGeoTopNode::kPrintShape
Definition: FWGeoTopNode.h:56
FWOverlapTableView
Definition: FWOverlapTableView.h:32
FWGeoTopNode::kVisSelfOff
Definition: FWGeoTopNode.h:48