12 #ifndef ROOT_TGLLogicalShape
13 #define ROOT_TGLLogicalShape
21 class TGLPhysicalShape;
23 class TGLSelectRecord;
31 friend class TGLScene;
34 TGLLogicalShape(
const TGLLogicalShape&);
35 TGLLogicalShape& operator=(
const TGLLogicalShape&);
38 enum ELODAxes { kLODAxesNone = 0,
42 kLODAxesAll = kLODAxesX | kLODAxesY | kLODAxesZ
47 mutable TGLPhysicalShape *fFirstPhysical;
49 TObject *fExternalObj;
50 TGLBoundingBox fBoundingBox;
51 mutable TGLScene *fScene;
52 mutable UInt_t fDLBase;
53 mutable Int_t fDLSize;
54 mutable UShort_t fDLValid;
55 mutable Bool_t fDLCache;
56 mutable Bool_t fRefStrong;
57 mutable Bool_t fOwnExtObj;
59 void PurgeDLRange(UInt_t base, Int_t size)
const;
61 static Bool_t fgIgnoreSizeForCameraInterest;
63 static Bool_t fgUseDLs;
64 static Bool_t fgUseDLsForVertArrs;
68 TGLLogicalShape(TObject* obj);
69 TGLLogicalShape(
const TBuffer3D & buffer);
70 virtual ~TGLLogicalShape();
73 UInt_t Ref()
const {
return fRef; }
74 void AddRef(TGLPhysicalShape* phys)
const;
75 void SubRef(TGLPhysicalShape* phys)
const;
76 void StrongRef(Bool_t strong)
const { fRefStrong = strong; }
77 void DestroyPhysicals();
78 UInt_t UnrefFirstPhysical();
80 const TGLPhysicalShape* GetFirstPhysical()
const {
return fFirstPhysical; }
82 TObject* ID()
const {
return fExternalObj; }
83 TObject* GetExternal()
const {
return fExternalObj; }
84 TGLScene* GetScene()
const {
return fScene; }
86 const TGLBoundingBox& BoundingBox()
const {
return fBoundingBox; }
87 virtual void UpdateBoundingBox() {}
88 void UpdateBoundingBoxesOfPhysicals();
91 Bool_t SetDLCache(Bool_t cached);
92 virtual Bool_t ShouldDLCache(
const TGLRnrCtx & rnrCtx)
const;
93 virtual UInt_t DLOffset(Short_t )
const {
return 0; }
94 virtual void DLCacheClear();
95 virtual void DLCacheDrop();
96 virtual void DLCachePurge();
98 virtual ELODAxes SupportedLODAxes()
const {
return kLODAxesNone; }
99 virtual Short_t QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD)
const;
100 virtual void Draw(TGLRnrCtx& rnrCtx)
const;
101 virtual void DirectDraw(TGLRnrCtx& rnrCtx)
const = 0;
103 virtual void DrawHighlight(TGLRnrCtx& rnrCtx,
const TGLPhysicalShape* pshp, Int_t lvl=-1)
const;
105 virtual Bool_t IgnoreSizeForOfInterest()
const;
108 virtual Bool_t KeepDuringSmartRefresh()
const {
return kFALSE; }
110 virtual Bool_t SupportsSecondarySelect()
const {
return kFALSE; }
111 virtual Bool_t AlwaysSecondarySelect()
const {
return kFALSE; }
112 virtual void ProcessSelection(TGLRnrCtx& rnrCtx, TGLSelectRecord& rec);
114 void InvokeContextMenu(TContextMenu & menu, UInt_t x, UInt_t y)
const;
116 static Bool_t GetIgnoreSizeForCameraInterest();
117 static void SetIgnoreSizeForCameraInterest(Bool_t isfci);
119 static void SetEnvDefaults();
121 ClassDef(TGLLogicalShape,0)
125 #endif // ROOT_TGLLogicalShape