12 #ifndef ROOT_TGLSelectRecord
13 #define ROOT_TGLSelectRecord
19 class TGLPhysicalShape;
20 class TGLLogicalShape;
21 class TGLOverlayElement;
27 class TGLSelectRecordBase
39 void CopyItems(UInt_t* items);
42 TGLSelectRecordBase();
43 TGLSelectRecordBase(UInt_t* data);
44 TGLSelectRecordBase(
const TGLSelectRecordBase& rec);
45 virtual ~TGLSelectRecordBase();
47 TGLSelectRecordBase& operator=(
const TGLSelectRecordBase& rec);
49 void SetRawOnly(UInt_t* data);
51 virtual void Set(UInt_t* data);
54 Int_t GetN()
const {
return fN; }
55 UInt_t* GetItems()
const {
return fItems; }
56 UInt_t GetItem(Int_t i)
const {
return fItems[i]; }
57 Float_t GetMinZ()
const {
return fMinZ; }
58 Float_t GetMaxZ()
const {
return fMaxZ; }
60 UInt_t GetCurrItem()
const {
return fPos < fN ? fItems[fPos] : 0; }
61 Int_t GetNLeft()
const {
return fN - fPos; }
62 void NextPos() { ++fPos; }
63 void PrevPos() { --fPos; }
64 void ResetPos() { fPos = 0; }
66 ClassDef(TGLSelectRecordBase, 0)
74 class TGLSelectRecord :
public TGLSelectRecordBase
77 enum ESecSelResult { kNone, kEnteringSelection, kLeavingSelection, kModifyingInternalSelection };
83 TGLSceneInfo *fSceneInfo;
84 TGLPhysicalShape *fPhysShape;
85 TGLLogicalShape *fLogShape;
91 ESecSelResult fSecSelRes;
95 TGLSelectRecord(UInt_t* data);
96 TGLSelectRecord(
const TGLSelectRecord& rec);
97 virtual ~TGLSelectRecord();
99 TGLSelectRecord& operator=(
const TGLSelectRecord& rec);
101 virtual void Set(UInt_t* data);
102 virtual void Reset();
104 Bool_t GetTransparent()
const {
return fTransparent; }
105 TGLSceneInfo * GetSceneInfo()
const {
return fSceneInfo; }
106 TGLPhysicalShape * GetPhysShape()
const {
return fPhysShape; }
107 TGLLogicalShape * GetLogShape()
const {
return fLogShape; }
108 TObject * GetObject()
const {
return fObject; }
109 void * GetSpecific()
const {
return fSpecific; }
110 Bool_t GetMultiple()
const {
return fMultiple; }
111 Bool_t GetHighlight()
const {
return fHighlight; }
113 ESecSelResult GetSecSelResult()
const {
return fSecSelRes; }
115 void SetTransparent(Bool_t t) { fTransparent = t; }
116 void SetSceneInfo (TGLSceneInfo* si) { fSceneInfo = si; }
117 void SetPhysShape (TGLPhysicalShape* pshp) { fPhysShape = pshp; }
118 void SetLogShape (TGLLogicalShape* lshp) { fLogShape = lshp; }
119 void SetObject (TObject* obj) { fObject = obj; }
120 void SetSpecific (
void* spec) { fSpecific = spec; }
121 void SetMultiple (Bool_t multi) { fMultiple = multi; }
122 void SetHighlight (Bool_t hlt) { fHighlight = hlt; }
124 void SetSecSelResult(ESecSelResult r) { fSecSelRes = r; }
128 static Bool_t AreSameSelectionWise(
const TGLSelectRecord& r1,
129 const TGLSelectRecord& r2);
131 ClassDef(TGLSelectRecord, 0)
139 class TGLOvlSelectRecord :
public TGLSelectRecordBase
143 TGLOverlayElement* fOvlElement;
146 TGLOvlSelectRecord();
147 TGLOvlSelectRecord(UInt_t* data);
148 TGLOvlSelectRecord(
const TGLOvlSelectRecord& rec);
149 virtual ~TGLOvlSelectRecord();
151 TGLOvlSelectRecord& operator=(
const TGLOvlSelectRecord& rec);
153 virtual void Set(UInt_t* data);
154 virtual void Reset();
156 TGLOverlayElement* GetOvlElement()
const {
return fOvlElement; }
157 void SetOvlElement(TGLOverlayElement* e) { fOvlElement = e; }
159 ClassDef(TGLOvlSelectRecord, 0)