12 #ifndef ROOT_TGLCameraOverlay
13 #define ROOT_TGLCameraOverlay
25 class TGLCameraOverlay :
public TGLOverlayElement
28 enum EMode { kPlaneIntersect, kBar, kAxis, kGridFront, kGridBack };
31 TGLCameraOverlay(
const TGLCameraOverlay&);
32 TGLCameraOverlay& operator=(
const TGLCameraOverlay&);
35 Bool_t fShowOrthographic;
36 Bool_t fShowPerspective;
38 EMode fOrthographicMode;
39 EMode fPerspectiveMode;
41 TGLAxisPainter *fAxisPainter;
44 Bool_t fUseAxisColors;
46 TGLPlane fExternalRefPlane;
47 Bool_t fUseExternalRefPlane;
52 void RenderPlaneIntersect(TGLRnrCtx& rnrCtx);
53 void RenderAxis(TGLRnrCtx& rnrCtx, Bool_t drawGrid);
54 void RenderGrid(TGLRnrCtx& rnrCtx);
55 void RenderBar(TGLRnrCtx& rnrCtx);
58 TGLCameraOverlay(Bool_t showOrtho=kTRUE, Bool_t showPersp=kFALSE);
59 virtual ~TGLCameraOverlay();
61 virtual void Render(TGLRnrCtx& rnrCtx);
63 TGLPlane& RefExternalRefPlane() {
return fExternalRefPlane; }
64 void UseExternalRefPlane(Bool_t x) { fUseExternalRefPlane=x; }
65 Bool_t GetUseExternalRefPlane()
const {
return fUseExternalRefPlane; }
67 Int_t GetPerspectiveMode()
const {
return fPerspectiveMode;}
68 void SetPerspectiveMode(EMode m) {fPerspectiveMode = m;}
69 Int_t GetOrthographicMode()
const {
return fOrthographicMode;}
70 void SetOrthographicMode(EMode m) {fOrthographicMode = m;}
72 Bool_t GetShowOrthographic()
const {
return fShowOrthographic; }
73 void SetShowOrthographic(Bool_t x) {fShowOrthographic =x;}
74 Bool_t GetShowPerspective()
const {
return fShowPerspective; }
75 void SetShowPerspective(Bool_t x) {fShowPerspective =x;}
77 void SetFrustum(TGLCamera& cam);
79 TAttAxis* GetAttAxis();
81 ClassDef(TGLCameraOverlay, 1);