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 {
63  };
64 
65  FWGeoTopNode(const char* n = "FWGeoTopNode", const char* t = "FWGeoTopNode"){}
66  virtual ~FWGeoTopNode(){}
67 
68  virtual void Paint(Option_t* option="");
70 
71  virtual FWGeometryTableManagerBase* tableManager() { return 0; }
72  virtual FWGeometryTableViewBase* browser() { return 0; }
73 
74  std::set<TGLPhysicalShape*> fHted;
75  std::set<TGLPhysicalShape*> fSted;
76 
78  bool selectPhysicalFromTable(int);
79  void clearSelection() {fHted.clear(); fSted.clear();}
80 
81  void printSelected();
82  virtual void popupMenu(int x, int y, TGLViewer*) {}
83 
84  virtual void UnSelected();
85  virtual void UnHighlighted();
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 
102  void setupBuffMtx(TBuffer3D& buff, const TGeoHMatrix& mat);
103 
104  FWPopupMenu* setPopupMenu(int iX, int iY, TGLViewer* v, bool);
105 
106 
107  void paintShape(Int_t idx, const TGeoHMatrix& nm, bool volumeColor, bool parentNode);
108  virtual void ComputeBBox();
109 private:
110  FWGeoTopNode(const FWGeoTopNode&); // stop default
111  const FWGeoTopNode& operator=(const FWGeoTopNode&); // stop default
112 #ifndef __CINT__
114 #endif
115 
116 
118 };
119 
120 
121 #endif
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:75
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:71
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:72
virtual ~FWGeoTopNode()
Definition: FWGeoTopNode.h:66
virtual void Paint(Option_t *option="")
void printSelected()
int getFirstSelectedTableIndex()
void clearSelection()
Definition: FWGeoTopNode.h:79
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:69
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:82
virtual void ComputeBBox()
FWGeoTopNode(const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
Definition: FWGeoTopNode.h:65
unsigned int UInt_t
Definition: FUTypes.h:12
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
virtual FWGeometryTableViewBase * browser()
Definition: FWGeoTopNode.h:72
bool selectPhysicalFromTable(int)
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:88
const FWGeoTopNode & operator=(const FWGeoTopNode &)
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:74
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
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:60
x
Definition: VDTMath.h:216
virtual void UnSelected()
mathSSE::Vec4< T > v
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:87
void setupBuffMtx(TBuffer3D &buff, const TGeoHMatrix &mat)
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:54