#ifndef ROOT_TGLSceneInfo_H
#define ROOT_TGLSceneInfo_H
#include "Rtypes.h"
#include "TGLBoundingBox.h"
#include "TGLUtil.h"
class TGLViewerBase;
class TGLSceneBase;
class TGLClip;
class TGLRenderContext;
class TGLCamera;
class TGLSceneInfo
{
friend class TGLSceneBase;
public:
enum EClipTest { kClipNone, kClipOutside, kClipInside };
private:
TGLSceneInfo(const TGLSceneInfo&);
TGLSceneInfo& operator=(const TGLSceneInfo&);
protected:
TGLViewerBase * fViewer;
TGLSceneBase * fScene;
Bool_t fActive;
Short_t fLOD;
Short_t fStyle;
TGLClip * fClip;
Short_t fLastLOD;
Short_t fLastStyle;
TGLClip * fLastClip;
TGLCamera * fLastCamera;
UInt_t fSceneStamp;
UInt_t fClipStamp;
UInt_t fCameraStamp;
Bool_t fUpdateTimeouted;
TGLBoundingBox fTransformedBBox;
Bool_t fViewCheck;
Bool_t fInFrustum;
Bool_t fInClip;
Char_t fClipMode;
TGLPlaneSet_t fFrustumPlanes;
TGLPlaneSet_t fClipPlanes;
public:
TGLSceneInfo(TGLViewerBase* view=0, TGLSceneBase* scene=0);
virtual ~TGLSceneInfo() {}
TGLViewerBase * GetViewer() const { return fViewer; }
TGLViewerBase & RefViewer() const { return *fViewer; }
TGLSceneBase * GetScene() const { return fScene; }
TGLSceneBase & RefScene() const { return *fScene; }
Bool_t GetActive() const { return fActive; }
void SetActive(Bool_t a);
void SetupTransformsAndBBox();
const TGLBoundingBox& GetTransformedBBox() { return fTransformedBBox; }
virtual void SetSceneTrans(TGLMatrix&) { ResetSceneStamp(); }
Bool_t ViewCheck() const { return fViewCheck; }
void ViewCheck(Bool_t c) { fViewCheck = c; }
Bool_t IsInFrustum() const { return fInFrustum; }
void InFrustum(Bool_t f) { fInFrustum = f; }
Bool_t IsInClip() const { return fInClip; }
void InClip(Bool_t c) { fInClip = c; }
Char_t ClipMode() const { return fClipMode; }
void ClipMode(Char_t m) { fClipMode = m; }
Bool_t ShouldClip() const { return fClipMode != kClipNone; }
Bool_t IsVisible() const { return fInFrustum && fInClip; }
std::vector<TGLPlane>& FrustumPlanes() { return fFrustumPlanes; }
std::vector<TGLPlane>& ClipPlanes() { return fClipPlanes; }
Short_t LOD() const { return fLOD; }
void SetLOD(Short_t lod) { fLOD = lod; }
Short_t Style() const { return fStyle; }
void SetStyle(Short_t st) { fStyle = st; }
TGLClip* Clip() const { return fClip; }
void SetClip(TGLClip *p) { fClip = p; }
Short_t LastLOD() const { return fLastLOD; }
void SetLastLOD(Short_t ld) { fLastLOD = ld; }
Short_t LastStyle() const { return fLastStyle; }
void SetLastStyle(Short_t st) { fLastStyle = st; }
TGLClip* LastClip() const { return fLastClip; }
void SetLastClip(TGLClip *p) { fLastClip = p; }
TGLCamera* LastCamera() const { return fLastCamera; }
void SetLastCamera(TGLCamera *p) { fLastCamera = p; }
UInt_t SceneStamp() const { return fSceneStamp; }
void SetSceneStamp(UInt_t ts) { fSceneStamp = ts; }
void ResetSceneStamp() { fSceneStamp = 0; }
UInt_t ClipStamp() const { return fClipStamp; }
void SetClipStamp(UInt_t ts) { fClipStamp = ts; }
void ResetClipStamp() { fClipStamp = 0; }
UInt_t CameraStamp() const { return fCameraStamp; }
void SetCameraStamp(UInt_t ts) { fCameraStamp = ts; }
void ResetCameraStamp() { fCameraStamp = 0; }
Bool_t HasUpdateTimeouted() const { return fUpdateTimeouted; }
void UpdateTimeouted() { fUpdateTimeouted = kTRUE; }
void ResetUpdateTimeouted() { fUpdateTimeouted = kFALSE; }
ClassDef(TGLSceneInfo, 0)
};
#endif
Last change: Mon Oct 27 08:03:16 2008
Last generated: 2008-10-27 08:03
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.