12 #ifndef ROOT_TGLSceneInfo_H
13 #define ROOT_TGLSceneInfo_H
23 class TGLRenderContext;
28 friend class TGLSceneBase;
31 enum EClipTest { kClipNone, kClipOutside, kClipInside };
34 TGLSceneInfo(
const TGLSceneInfo&);
35 TGLSceneInfo& operator=(
const TGLSceneInfo&);
38 TGLViewerBase * fViewer;
39 TGLSceneBase * fScene;
53 TGLCamera * fLastCamera;
58 Bool_t fUpdateTimeouted;
65 TGLBoundingBox fTransformedBBox;
71 TGLPlaneSet_t fFrustumPlanes;
72 TGLPlaneSet_t fClipPlanes;
78 TGLSceneInfo(TGLViewerBase* view=0, TGLSceneBase* scene=0);
79 virtual ~TGLSceneInfo() {}
81 TGLViewerBase * GetViewer()
const {
return fViewer; }
82 TGLViewerBase & RefViewer()
const {
return *fViewer; }
83 TGLSceneBase * GetScene()
const {
return fScene; }
84 TGLSceneBase & RefScene()
const {
return *fScene; }
86 Bool_t GetActive()
const {
return fActive; }
87 void SetActive(Bool_t a);
89 void SetupTransformsAndBBox();
91 const TGLBoundingBox& GetTransformedBBox() {
return fTransformedBBox; }
93 virtual void SetSceneTrans(TGLMatrix&) { ResetSceneStamp(); }
95 Bool_t ViewCheck()
const {
return fViewCheck; }
96 void ViewCheck(Bool_t c) { fViewCheck = c; }
97 Bool_t IsInFrustum()
const {
return fInFrustum; }
98 void InFrustum(Bool_t f) { fInFrustum = f; }
99 Bool_t IsInClip()
const {
return fInClip; }
100 void InClip(Bool_t c) { fInClip = c; }
101 Char_t ClipMode()
const {
return fClipMode; }
102 void ClipMode(Char_t m) { fClipMode = m; }
104 Bool_t ShouldClip()
const {
return fClipMode != kClipNone; }
105 Bool_t IsVisible()
const {
return fInFrustum && fInClip; }
107 std::vector<TGLPlane>& FrustumPlanes() {
return fFrustumPlanes; }
108 std::vector<TGLPlane>& ClipPlanes() {
return fClipPlanes; }
110 Short_t LOD()
const {
return fLOD; }
111 void SetLOD(Short_t lod) { fLOD = lod; }
113 Short_t Style()
const {
return fStyle; }
114 void SetStyle(Short_t st) { fStyle = st; }
116 Float_t WFLineW()
const {
return fWFLineW; }
117 void SetWFLineW(Float_t w) { fWFLineW = w; }
118 Float_t OLLineW()
const {
return fOLLineW; }
119 void SetOLLineW(Float_t w) { fOLLineW = w; }
121 TGLClip* Clip()
const {
return fClip; }
122 void SetClip(TGLClip *p) { fClip = p; }
124 Short_t LastLOD()
const {
return fLastLOD; }
125 void SetLastLOD(Short_t ld) { fLastLOD = ld; }
127 Short_t LastStyle()
const {
return fLastStyle; }
128 void SetLastStyle(Short_t st) { fLastStyle = st; }
130 Float_t LastWFLineW()
const {
return fLastWFLineW; }
131 void SetLastWFLineW(Float_t w) { fLastWFLineW = w; }
132 Float_t LastOLLineW()
const {
return fLastOLLineW; }
133 void SetLastOLLineW(Float_t w) { fLastOLLineW = w; }
135 TGLClip* LastClip()
const {
return fLastClip; }
136 void SetLastClip(TGLClip *p) { fLastClip = p; }
138 TGLCamera* LastCamera()
const {
return fLastCamera; }
139 void SetLastCamera(TGLCamera *p) { fLastCamera = p; }
141 UInt_t SceneStamp()
const {
return fSceneStamp; }
142 void SetSceneStamp(UInt_t ts) { fSceneStamp = ts; }
143 void ResetSceneStamp() { fSceneStamp = 0; }
145 UInt_t ClipStamp()
const {
return fClipStamp; }
146 void SetClipStamp(UInt_t ts) { fClipStamp = ts; }
147 void ResetClipStamp() { fClipStamp = 0; }
149 UInt_t CameraStamp()
const {
return fCameraStamp; }
150 void SetCameraStamp(UInt_t ts) { fCameraStamp = ts; }
151 void ResetCameraStamp() { fCameraStamp = 0; }
153 Bool_t HasUpdateTimeouted()
const {
return fUpdateTimeouted; }
154 void UpdateTimeouted() { fUpdateTimeouted = kTRUE; }
155 void ResetUpdateTimeouted() { fUpdateTimeouted = kFALSE; }
157 ClassDef(TGLSceneInfo, 0)