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 // $Id: FWGeoTopNode.h,v 1.13 2012/05/08 02:32:51 amraktad Exp $
20 //
21 
22 #ifndef __CINT__
24 #endif
25 #include "TEveElement.h"
26 #include "TAttBBox.h"
27 #include "TGLUtil.h"
28 #include <set>
29 
30 class TGeoHMatrix;
31 class TGLPhysicalShape;
32 class TGLSelectRecord;
33 class TGLViewer;
34 
36 class FWOverlapTableView;
37 class TBuffer3D;
38 class TGeoNode;
40 class FWPopupMenu;
41 
42 class FWGeoTopNode : public TEveElementList,
43  public TAttBBox
44 {
45  friend class FWGeoTopNodeGL;
46 public:
47 
48  enum MenuOptions {
61  };
62 
63  FWGeoTopNode(const char* n = "FWGeoTopNode", const char* t = "FWGeoTopNode"){}
64  virtual ~FWGeoTopNode(){}
65 
66  virtual void Paint(Option_t* option="");
68 
69  virtual FWGeometryTableManagerBase* tableManager() { return 0; }
70  virtual FWGeometryTableViewBase* browser() { return 0; }
71 
72  std::set<TGLPhysicalShape*> fHted;
73  std::set<TGLPhysicalShape*> fSted;
74 
76  bool selectPhysicalFromTable(int);
77  void clearSelection() {fHted.clear(); fSted.clear();}
78 
79  void printSelected();
80  virtual void popupMenu(int x, int y, TGLViewer*) {}
81 
82  virtual void UnSelected();
83  virtual void UnHighlighted();
84 
85  static TGLVector3 s_pickedCamera3DCenter;
86  static TGLViewer* s_pickedViewer;
87 
88 protected:
89  static UInt_t phyID(int tableIdx);
90  static int tableIdx(TGLPhysicalShape* ps);
91 
92  void ProcessSelection(TGLSelectRecord& rec, std::set<TGLPhysicalShape*>& sset, TGLPhysicalShape* id);
93 
94  void EraseFromSet(std::set<TGLPhysicalShape*>& sset, TGLPhysicalShape* id);
95  void ClearSet(std::set<TGLPhysicalShape*>& sset);
96 
97  void SetStateOf(TGLPhysicalShape* id);
98 
99 
100  void setupBuffMtx(TBuffer3D& buff, const TGeoHMatrix& mat);
101 
102  FWPopupMenu* setPopupMenu(int iX, int iY, TGLViewer* v, bool);
103 
104 
105  void paintShape(Int_t idx, const TGeoHMatrix& nm, bool volumeColor, bool parentNode);
106  virtual void ComputeBBox();
107 private:
108  FWGeoTopNode(const FWGeoTopNode&); // stop default
109  const FWGeoTopNode& operator=(const FWGeoTopNode&); // stop default
110 #ifndef __CINT__
112 #endif
113 
114 
116 };
117 
118 
119 #endif
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:73
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:69
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:72
virtual ~FWGeoTopNode()
Definition: FWGeoTopNode.h:64
virtual void Paint(Option_t *option="")
void printSelected()
int getFirstSelectedTableIndex()
void clearSelection()
Definition: FWGeoTopNode.h:77
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:67
UChar_t wrapTransparency(FWGeometryTableManagerBase::NodeInfo &data, bool leafNode)
unsigned char UChar_t
Definition: FUTypes.h:14
virtual void popupMenu(int x, int y, TGLViewer *)
Definition: FWGeoTopNode.h:80
virtual void ComputeBBox()
FWGeoTopNode(const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
Definition: FWGeoTopNode.h:63
unsigned int UInt_t
Definition: FUTypes.h:12
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
virtual FWGeometryTableViewBase * browser()
Definition: FWGeoTopNode.h:70
bool selectPhysicalFromTable(int)
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:86
const FWGeoTopNode & operator=(const FWGeoTopNode &)
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:72
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:65
void ProcessSelection(TGLSelectRecord &rec, std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
ClassDef(FWGeoTopNode, 0)
void SetStateOf(TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:82
Definition: DDAxes.h:10
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:60
virtual void UnSelected()
mathSSE::Vec4< T > v
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:85
void setupBuffMtx(TBuffer3D &buff, const TGeoHMatrix &mat)
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:54