Logo ROOT   6.10/09
Reference Guide
TGLCameraOverlay.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Alja Mrak-Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGLCameraOverlay
13 #define ROOT_TGLCameraOverlay
14 
15 #include "TAttAxis.h"
16 #include "TGLOverlay.h"
17 #include "TGLUtil.h"
18 
19 class TGLAxisPainter;
20 class TGLFont;
21 
22 class TAttAxis;
23 class TAxis;
24 
26 {
27 public:
29 
30 private:
31  TGLCameraOverlay(const TGLCameraOverlay&); // Not implemented
32  TGLCameraOverlay& operator=(const TGLCameraOverlay&); // Not implemented
33 
34 protected:
37 
40 
45 
48 
50 
51 
52  void RenderPlaneIntersect(TGLRnrCtx& rnrCtx);
53  void RenderAxis(TGLRnrCtx& rnrCtx, Bool_t drawGrid);
54  void RenderGrid(TGLRnrCtx& rnrCtx);
55  void RenderBar(TGLRnrCtx& rnrCtx);
56 
57 public:
58  TGLCameraOverlay(Bool_t showOrtho=kTRUE, Bool_t showPersp=kFALSE);
59  virtual ~TGLCameraOverlay();
60 
61  virtual void Render(TGLRnrCtx& rnrCtx);
62 
64  void UseExternalRefPlane(Bool_t x) { fUseExternalRefPlane=x; }
66 
68  void SetPerspectiveMode(EMode m) {fPerspectiveMode = m;}
70  void SetOrthographicMode(EMode m) {fOrthographicMode = m;}
71 
73  void SetShowOrthographic(Bool_t x) {fShowOrthographic =x;}
75  void SetShowPerspective(Bool_t x) {fShowPerspective =x;}
76 
77  void SetFrustum(TGLCamera& cam);
78 
80 
81  ClassDef(TGLCameraOverlay, 1); // Show coorinates of current camera frustum.
82 };
83 
84 #endif
void RenderGrid(TGLRnrCtx &rnrCtx)
TGLAxisPainter * fAxisPainter
A GL overlay element which displays camera furstum.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition: TGLCamera.h:43
float Float_t
Definition: RtypesCore.h:53
TGLPlane fExternalRefPlane
Int_t GetPerspectiveMode() const
TGLCameraOverlay & operator=(const TGLCameraOverlay &)
void RenderAxis(TGLRnrCtx &rnrCtx, Bool_t drawGrid)
Draw axis on four edges and a transparent grid.
Bool_t GetUseExternalRefPlane() const
void SetFrustum(TGLCamera &cam)
Set frustum values from given camera.
TGLCameraOverlay(const TGLCameraOverlay &)
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Manages histogram axis attributes.
Definition: TAttAxis.h:18
virtual void Render(TGLRnrCtx &rnrCtx)
Display coordinates info of current frustum.
Int_t GetOrthographicMode() const
An overlay element.
Definition: TGLOverlay.h:22
virtual ~TGLCameraOverlay()
Destructor.
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:297
Double_t fFrustum[4]
Class to manage histogram axis.
Definition: TAxis.h:30
TMarker * m
Definition: textangle.C:8
Bool_t GetShowPerspective() const
void RenderBar(TGLRnrCtx &rnrCtx)
Show frustum size with fixed screen line length and printed value.
void SetShowPerspective(Bool_t x)
void SetOrthographicMode(EMode m)
const Bool_t kFALSE
Definition: RtypesCore.h:92
double Double_t
Definition: RtypesCore.h:55
void SetPerspectiveMode(EMode m)
Bool_t GetShowOrthographic() const
void RenderPlaneIntersect(TGLRnrCtx &rnrCtx)
Draw cross section coordinates in top right corner of screen.
TGLPlane & RefExternalRefPlane()
A wrapper class for FTFont.
const Bool_t kTRUE
Definition: RtypesCore.h:91
3D plane class - of format Ax + By + Cz + D = 0
Definition: TGLUtil.h:525
void UseExternalRefPlane(Bool_t x)
void SetShowOrthographic(Bool_t x)
TAttAxis * GetAttAxis()
Get axis attributes.