12 #ifndef ROOT_TGLObject
13 #define ROOT_TGLObject
21 class TGLObject :
public TGLLogicalShape
24 static TMap fgGLClassMap;
25 static TClass* SearchGLRenderer(TClass* cls);
28 mutable Bool_t fMultiColor;
30 Bool_t SetModelCheckClass(TObject* obj, TClass* cls);
32 void SetAxisAlignedBBox(Float_t xmin, Float_t xmax,
33 Float_t ymin, Float_t ymax,
34 Float_t zmin, Float_t zmax);
35 void SetAxisAlignedBBox(
const Float_t* p);
37 template <
class TT> TT* SetModelDynCast(TObject* obj)
39 TT *ret =
dynamic_cast<TT*
>(obj);
40 if (!ret)
throw std::runtime_error(
"Object of wrong type passed.");
45 template <
class TT> TT* DynCast(TObject* obj)
47 TT *ret =
dynamic_cast<TT*
>(obj);
48 if (!ret)
throw std::runtime_error(
"Object of wrong type passed.");
53 TGLObject() : TGLLogicalShape(0), fMultiColor(kFALSE) {}
54 virtual ~TGLObject() {}
56 virtual Bool_t ShouldDLCache(
const TGLRnrCtx& rnrCtx)
const;
62 virtual Bool_t KeepDuringSmartRefresh()
const {
return kTRUE; }
63 virtual void UpdateBoundingBox();
66 virtual Bool_t SetModel(TObject* obj,
const Option_t* opt=0) = 0;
67 virtual void SetBBox() = 0;
72 static TClass* GetGLRenderer(TClass* isa);
74 ClassDef(TGLObject, 0);