// @(#)root/gl:$Id$
// Author:  Richard Maunder  25/05/2005

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TMath.h"

#include "TGLOrthoCamera.h"
#include "TGLIncludes.h"
#include "TGLUtil.h"


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGLOrthoCamera                                                       //
//                                                                      //
// Orthographic projection camera. Currently limited to three types     //
// defined at construction time - kXOY, kXOZ, kZOY - where this refers  //
// to the viewport plane axis - e.g. kXOY has X axis horizontal, Y      //
// vertical - i.e. looking down Z axis with Y vertical.                 //
//
// The plane types restriction could easily be removed to supported     //
// arbitary ortho projections along any axis/orientation with free      //
// rotations about them.                                                //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

ClassImp(TGLOrthoCamera)

UInt_t   TGLOrthoCamera::fgZoomDeltaSens = 500;

//______________________________________________________________________________
TGLOrthoCamera::TGLOrthoCamera() :
   TGLCamera(TGLVector3( 0.0, 0.0, 1.0), TGLVector3(0.0, 1.0, 0.0)),
   fType(kXOY),
   fEnableRotate(kFALSE), fDollyToZoom(kTRUE),
   fZoomMin(0.001), fZoomDefault(0.78), fZoomMax(1000.0),
   fVolume(TGLVertex3(-100.0, -100.0, -100.0), TGLVertex3(100.0, 100.0, 100.0)),
   fZoom(1.0)
{
   // Construct kXOY orthographic camera.

   Setup(TGLBoundingBox(TGLVertex3(-100,-100,-100), TGLVertex3(100,100,100)));
}

//______________________________________________________________________________
TGLOrthoCamera::TGLOrthoCamera(EType type, const TGLVector3 & hAxis, const TGLVector3 & vAxis) :
   TGLCamera(hAxis, vAxis),
   fType(type),
   fEnableRotate(kFALSE), fDollyToZoom(kTRUE),
   fZoomMin(0.001), fZoomDefault(0.78), fZoomMax(1000.0),
   fVolume(TGLVertex3(-100.0, -100.0, -100.0), TGLVertex3(100.0, 100.0, 100.0)),
   fZoom(1.0)
{
   // Construct orthographic camera.

   Setup(TGLBoundingBox(TGLVertex3(-100,-100,-100), TGLVertex3(100,100,100)));
}

//______________________________________________________________________________
TGLOrthoCamera::~TGLOrthoCamera()
{
   // Destroy orthographic camera.
}

//______________________________________________________________________________
void TGLOrthoCamera::Setup(const TGLBoundingBox & box, Bool_t reset)
{
   // Setup camera limits suitible to view the world volume defined by 'box'
   // and call Reset() to initialise camera.

   fVolume = box;

   if (fExternalCenter == kFALSE)
   {
      if (fFixDefCenter)
      {
         SetCenterVec(fFDCenter.X(), fFDCenter.Y(), fFDCenter.Z());
      }
      else
      {
         TGLVertex3 center = box.Center();
         SetCenterVec(center.X(), center.Y(), center.Z());
      }
   }
   if (reset)
      Reset();
}

//______________________________________________________________________________
void TGLOrthoCamera::Reset()
{
   // Reset the camera to defaults - trucking, zooming to reframe the world volume
   // established in Setup(). Note: limits defined in Setup() are not adjusted.

   TGLVector3 e = fVolume.Extents();
   switch (fType) {
      case kXOY:
      case kXnOY:
      {
         // X -> X, Y -> Y, Z -> Z
         fDefXSize = e.X(); fDefYSize = e.Y();
         break;
      }
      case kXOZ:
      case kXnOZ:
      {
         // X -> X, Z -> Y, Y -> Z
         fDefXSize = e.X(); fDefYSize = e.Z();
         break;
      }

      case kZOY:
      case kZnOY:
      {
         // Z -> X, Y -> Y, X -> Z
         fDefXSize = e.Z(); fDefYSize = e.Y();
         break;
      }
   }

   fDollyDefault  = 1.25*0.5*TMath::Sqrt(3)*fVolume.Extents().Mag();
   fDollyDistance = 0.002 * fDollyDefault;
   fZoom   = fZoomDefault;
   fCamTrans.SetIdentity();
   fCamTrans.MoveLF(1, fDollyDefault);
   IncTimeStamp();
}

//______________________________________________________________________________
Bool_t TGLOrthoCamera::Dolly(Int_t delta, Bool_t mod1, Bool_t mod2)
{
   // Dolly the camera.
   // By default the dolly is reinterpreted to zoom, but it can be
   // changed by modifying the fDollyToZoom data-member.

   if (fDollyToZoom) {
      return Zoom(delta, mod1, mod2);
   } else {
      return TGLCamera::Dolly(delta, mod1, mod2);
   }
}

//______________________________________________________________________________
Bool_t TGLOrthoCamera::Zoom(Int_t delta, Bool_t mod1, Bool_t mod2)
{
   // Zoom the camera - 'adjust lens focal length, retaining camera position'.
   // Arguments are:
   //
   // 'delta' - mouse viewport delta (pixels) - +ive zoom in, -ive zoom out
   // 'mod1' / 'mod2' - sensitivity modifiers - see TGLCamera::AdjustAndClampVal()
   //
   // For an orthographic camera dollying and zooming are identical and both equate
   // logically to a rescaling of the viewport limits - without center shift.
   // There is no perspective foreshortening or lens 'focal length'.
   //
   // Returns kTRUE is redraw required (camera change), kFALSE otherwise.

   if (AdjustAndClampVal(fZoom, fZoomMin, fZoomMax, -delta*2, fgZoomDeltaSens, mod1, mod2))
   {
      IncTimeStamp();
      return kTRUE;
   }
   else
   {
      return kFALSE;
   }
}

//______________________________________________________________________________
void TGLOrthoCamera::SetZoomMin(Double_t z)
{
   // Set minimum zoom factor. If current zoom is less than z it is
   // set to z.

   fZoomMin = z;
   if (fZoom < fZoomMin) {
      fZoom = fZoomMin;
      IncTimeStamp();
   }
}

//______________________________________________________________________________
void TGLOrthoCamera::SetZoomMax(Double_t z)
{
   // Set maximum zoom factor. If current zoom is greater than z it
   // is set to z.

   fZoomMax = z;
   if (fZoom > fZoomMax) {
      fZoom = fZoomMax;
      IncTimeStamp();
   }
}

//______________________________________________________________________________
Bool_t TGLOrthoCamera::Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
{
   // Truck the camera - 'move camera parallel to film plane'.
   // Returns kTRUE is redraw required (camera change), kFALSE otherwise.

   Double_t xstep = 2.0 * xDelta / fProjM[0] / fViewport.Width();
   Double_t ystep = 2.0 * yDelta / fProjM[5] / fViewport.Height();

   xstep = AdjustDelta(xstep, 1.0, mod1, mod2);
   ystep = AdjustDelta(ystep, 1.0, mod1, mod2);

   return Truck(-xstep, -ystep);
}

//______________________________________________________________________________
Bool_t TGLOrthoCamera::Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
{
   // Rotate the camera - 'swivel round the view volume center'.
   // Returns kTRUE is redraw required (camera change), kFALSE otherwise.

   if (fEnableRotate)
      return TGLCamera::Rotate(xDelta, yDelta, mod1, mod2);
   else
      return kFALSE;
}

//______________________________________________________________________________
void TGLOrthoCamera::Apply(const TGLBoundingBox & /*box*/,
                           const TGLRect        * pickRect) const
{
   // Apply the camera to the current GL context, setting the viewport, projection
   // and modelview matricies. After this verticies etc can be directly entered
   // in the world frame. This also updates the cached frustum values, enabling
   // all the projection, overlap tests etc defined in TGLCamera to be used.
   //
   // Arguments are:
   // 'box' - view volume box - ignored for ortho camera. Assumed to be same
   // as one passed to Setup().
   // 'pickRect' - optional picking rect. If non-null, restrict drawing to this
   // viewport rect.

   glViewport(fViewport.X(), fViewport.Y(), fViewport.Width(), fViewport.Height());

   if(fViewport.Width() == 0 || fViewport.Height() == 0)
   {
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      return;
   }

   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();

   // Load up any picking rect
   if (pickRect)
   {
      TGLRect rect(*pickRect);
      WindowToViewport(rect);
      gluPickMatrix(rect.X(), rect.Y(), rect.Width(), rect.Height(),
                    (Int_t*) fViewport.CArr());
   }

   Double_t halfRangeX, halfRangeY;
   if (fDefYSize*fViewport.Width()/fDefXSize > fViewport.Height()) {
      halfRangeY = 0.5 *fDefYSize;
      halfRangeX = halfRangeY*fViewport.Width()/fViewport.Height();
   } else {
      halfRangeX = 0.5 *fDefXSize;
      halfRangeY = halfRangeX*fViewport.Height()/fViewport.Width();
   }

   halfRangeX /= fZoom;
   halfRangeY /= fZoom;

   fNearClip = 0.05*fDollyDefault;
   fFarClip  = 2.0*fDollyDefault;
   glOrtho(-halfRangeX, halfRangeX,
           -halfRangeY, halfRangeY,
            fNearClip,  fFarClip);

   if (!pickRect) glGetDoublev(GL_PROJECTION_MATRIX, fLastNoPickProjM.Arr());

   // ii) setup modelview
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
   TGLMatrix  mx     = fCamBase*fCamTrans;
   TGLVector3 pos    = mx.GetTranslation();
   TGLVector3 fwd    = mx.GetBaseVec(1);
   TGLVector3 center = pos - fwd;
   TGLVector3 up     = mx.GetBaseVec(3);

   gluLookAt(pos[0],    pos[1],    pos[2],
             center[0], center[1], center[2],
             up[0],     up[1],     up[2]);

   if (fCacheDirty) UpdateCache();
}

//______________________________________________________________________________
void TGLOrthoCamera::Configure(Double_t zoom, Double_t dolly, Double_t center[3],
                               Double_t hRotate, Double_t vRotate)
{
   // Configure the camera state.
   //   zoom    - set directly (default = 0.78);
   //   dolly   - additional move along the camera forward direction;
   //   center  - new camera center (can be 0 for no change);
   //   hRotate - additional "up/down" rotation in radians;
   //   vRotate - additional "left/right" rotation in radians.

   fZoom = zoom;

   if (center)
      SetCenterVec(center[0], center[1], center[2]);

   fCamTrans.MoveLF(1, dolly);
   RotateRad(hRotate, vRotate);

   IncTimeStamp();
}
 TGLOrthoCamera.cxx:1
 TGLOrthoCamera.cxx:2
 TGLOrthoCamera.cxx:3
 TGLOrthoCamera.cxx:4
 TGLOrthoCamera.cxx:5
 TGLOrthoCamera.cxx:6
 TGLOrthoCamera.cxx:7
 TGLOrthoCamera.cxx:8
 TGLOrthoCamera.cxx:9
 TGLOrthoCamera.cxx:10
 TGLOrthoCamera.cxx:11
 TGLOrthoCamera.cxx:12
 TGLOrthoCamera.cxx:13
 TGLOrthoCamera.cxx:14
 TGLOrthoCamera.cxx:15
 TGLOrthoCamera.cxx:16
 TGLOrthoCamera.cxx:17
 TGLOrthoCamera.cxx:18
 TGLOrthoCamera.cxx:19
 TGLOrthoCamera.cxx:20
 TGLOrthoCamera.cxx:21
 TGLOrthoCamera.cxx:22
 TGLOrthoCamera.cxx:23
 TGLOrthoCamera.cxx:24
 TGLOrthoCamera.cxx:25
 TGLOrthoCamera.cxx:26
 TGLOrthoCamera.cxx:27
 TGLOrthoCamera.cxx:28
 TGLOrthoCamera.cxx:29
 TGLOrthoCamera.cxx:30
 TGLOrthoCamera.cxx:31
 TGLOrthoCamera.cxx:32
 TGLOrthoCamera.cxx:33
 TGLOrthoCamera.cxx:34
 TGLOrthoCamera.cxx:35
 TGLOrthoCamera.cxx:36
 TGLOrthoCamera.cxx:37
 TGLOrthoCamera.cxx:38
 TGLOrthoCamera.cxx:39
 TGLOrthoCamera.cxx:40
 TGLOrthoCamera.cxx:41
 TGLOrthoCamera.cxx:42
 TGLOrthoCamera.cxx:43
 TGLOrthoCamera.cxx:44
 TGLOrthoCamera.cxx:45
 TGLOrthoCamera.cxx:46
 TGLOrthoCamera.cxx:47
 TGLOrthoCamera.cxx:48
 TGLOrthoCamera.cxx:49
 TGLOrthoCamera.cxx:50
 TGLOrthoCamera.cxx:51
 TGLOrthoCamera.cxx:52
 TGLOrthoCamera.cxx:53
 TGLOrthoCamera.cxx:54
 TGLOrthoCamera.cxx:55
 TGLOrthoCamera.cxx:56
 TGLOrthoCamera.cxx:57
 TGLOrthoCamera.cxx:58
 TGLOrthoCamera.cxx:59
 TGLOrthoCamera.cxx:60
 TGLOrthoCamera.cxx:61
 TGLOrthoCamera.cxx:62
 TGLOrthoCamera.cxx:63
 TGLOrthoCamera.cxx:64
 TGLOrthoCamera.cxx:65
 TGLOrthoCamera.cxx:66
 TGLOrthoCamera.cxx:67
 TGLOrthoCamera.cxx:68
 TGLOrthoCamera.cxx:69
 TGLOrthoCamera.cxx:70
 TGLOrthoCamera.cxx:71
 TGLOrthoCamera.cxx:72
 TGLOrthoCamera.cxx:73
 TGLOrthoCamera.cxx:74
 TGLOrthoCamera.cxx:75
 TGLOrthoCamera.cxx:76
 TGLOrthoCamera.cxx:77
 TGLOrthoCamera.cxx:78
 TGLOrthoCamera.cxx:79
 TGLOrthoCamera.cxx:80
 TGLOrthoCamera.cxx:81
 TGLOrthoCamera.cxx:82
 TGLOrthoCamera.cxx:83
 TGLOrthoCamera.cxx:84
 TGLOrthoCamera.cxx:85
 TGLOrthoCamera.cxx:86
 TGLOrthoCamera.cxx:87
 TGLOrthoCamera.cxx:88
 TGLOrthoCamera.cxx:89
 TGLOrthoCamera.cxx:90
 TGLOrthoCamera.cxx:91
 TGLOrthoCamera.cxx:92
 TGLOrthoCamera.cxx:93
 TGLOrthoCamera.cxx:94
 TGLOrthoCamera.cxx:95
 TGLOrthoCamera.cxx:96
 TGLOrthoCamera.cxx:97
 TGLOrthoCamera.cxx:98
 TGLOrthoCamera.cxx:99
 TGLOrthoCamera.cxx:100
 TGLOrthoCamera.cxx:101
 TGLOrthoCamera.cxx:102
 TGLOrthoCamera.cxx:103
 TGLOrthoCamera.cxx:104
 TGLOrthoCamera.cxx:105
 TGLOrthoCamera.cxx:106
 TGLOrthoCamera.cxx:107
 TGLOrthoCamera.cxx:108
 TGLOrthoCamera.cxx:109
 TGLOrthoCamera.cxx:110
 TGLOrthoCamera.cxx:111
 TGLOrthoCamera.cxx:112
 TGLOrthoCamera.cxx:113
 TGLOrthoCamera.cxx:114
 TGLOrthoCamera.cxx:115
 TGLOrthoCamera.cxx:116
 TGLOrthoCamera.cxx:117
 TGLOrthoCamera.cxx:118
 TGLOrthoCamera.cxx:119
 TGLOrthoCamera.cxx:120
 TGLOrthoCamera.cxx:121
 TGLOrthoCamera.cxx:122
 TGLOrthoCamera.cxx:123
 TGLOrthoCamera.cxx:124
 TGLOrthoCamera.cxx:125
 TGLOrthoCamera.cxx:126
 TGLOrthoCamera.cxx:127
 TGLOrthoCamera.cxx:128
 TGLOrthoCamera.cxx:129
 TGLOrthoCamera.cxx:130
 TGLOrthoCamera.cxx:131
 TGLOrthoCamera.cxx:132
 TGLOrthoCamera.cxx:133
 TGLOrthoCamera.cxx:134
 TGLOrthoCamera.cxx:135
 TGLOrthoCamera.cxx:136
 TGLOrthoCamera.cxx:137
 TGLOrthoCamera.cxx:138
 TGLOrthoCamera.cxx:139
 TGLOrthoCamera.cxx:140
 TGLOrthoCamera.cxx:141
 TGLOrthoCamera.cxx:142
 TGLOrthoCamera.cxx:143
 TGLOrthoCamera.cxx:144
 TGLOrthoCamera.cxx:145
 TGLOrthoCamera.cxx:146
 TGLOrthoCamera.cxx:147
 TGLOrthoCamera.cxx:148
 TGLOrthoCamera.cxx:149
 TGLOrthoCamera.cxx:150
 TGLOrthoCamera.cxx:151
 TGLOrthoCamera.cxx:152
 TGLOrthoCamera.cxx:153
 TGLOrthoCamera.cxx:154
 TGLOrthoCamera.cxx:155
 TGLOrthoCamera.cxx:156
 TGLOrthoCamera.cxx:157
 TGLOrthoCamera.cxx:158
 TGLOrthoCamera.cxx:159
 TGLOrthoCamera.cxx:160
 TGLOrthoCamera.cxx:161
 TGLOrthoCamera.cxx:162
 TGLOrthoCamera.cxx:163
 TGLOrthoCamera.cxx:164
 TGLOrthoCamera.cxx:165
 TGLOrthoCamera.cxx:166
 TGLOrthoCamera.cxx:167
 TGLOrthoCamera.cxx:168
 TGLOrthoCamera.cxx:169
 TGLOrthoCamera.cxx:170
 TGLOrthoCamera.cxx:171
 TGLOrthoCamera.cxx:172
 TGLOrthoCamera.cxx:173
 TGLOrthoCamera.cxx:174
 TGLOrthoCamera.cxx:175
 TGLOrthoCamera.cxx:176
 TGLOrthoCamera.cxx:177
 TGLOrthoCamera.cxx:178
 TGLOrthoCamera.cxx:179
 TGLOrthoCamera.cxx:180
 TGLOrthoCamera.cxx:181
 TGLOrthoCamera.cxx:182
 TGLOrthoCamera.cxx:183
 TGLOrthoCamera.cxx:184
 TGLOrthoCamera.cxx:185
 TGLOrthoCamera.cxx:186
 TGLOrthoCamera.cxx:187
 TGLOrthoCamera.cxx:188
 TGLOrthoCamera.cxx:189
 TGLOrthoCamera.cxx:190
 TGLOrthoCamera.cxx:191
 TGLOrthoCamera.cxx:192
 TGLOrthoCamera.cxx:193
 TGLOrthoCamera.cxx:194
 TGLOrthoCamera.cxx:195
 TGLOrthoCamera.cxx:196
 TGLOrthoCamera.cxx:197
 TGLOrthoCamera.cxx:198
 TGLOrthoCamera.cxx:199
 TGLOrthoCamera.cxx:200
 TGLOrthoCamera.cxx:201
 TGLOrthoCamera.cxx:202
 TGLOrthoCamera.cxx:203
 TGLOrthoCamera.cxx:204
 TGLOrthoCamera.cxx:205
 TGLOrthoCamera.cxx:206
 TGLOrthoCamera.cxx:207
 TGLOrthoCamera.cxx:208
 TGLOrthoCamera.cxx:209
 TGLOrthoCamera.cxx:210
 TGLOrthoCamera.cxx:211
 TGLOrthoCamera.cxx:212
 TGLOrthoCamera.cxx:213
 TGLOrthoCamera.cxx:214
 TGLOrthoCamera.cxx:215
 TGLOrthoCamera.cxx:216
 TGLOrthoCamera.cxx:217
 TGLOrthoCamera.cxx:218
 TGLOrthoCamera.cxx:219
 TGLOrthoCamera.cxx:220
 TGLOrthoCamera.cxx:221
 TGLOrthoCamera.cxx:222
 TGLOrthoCamera.cxx:223
 TGLOrthoCamera.cxx:224
 TGLOrthoCamera.cxx:225
 TGLOrthoCamera.cxx:226
 TGLOrthoCamera.cxx:227
 TGLOrthoCamera.cxx:228
 TGLOrthoCamera.cxx:229
 TGLOrthoCamera.cxx:230
 TGLOrthoCamera.cxx:231
 TGLOrthoCamera.cxx:232
 TGLOrthoCamera.cxx:233
 TGLOrthoCamera.cxx:234
 TGLOrthoCamera.cxx:235
 TGLOrthoCamera.cxx:236
 TGLOrthoCamera.cxx:237
 TGLOrthoCamera.cxx:238
 TGLOrthoCamera.cxx:239
 TGLOrthoCamera.cxx:240
 TGLOrthoCamera.cxx:241
 TGLOrthoCamera.cxx:242
 TGLOrthoCamera.cxx:243
 TGLOrthoCamera.cxx:244
 TGLOrthoCamera.cxx:245
 TGLOrthoCamera.cxx:246
 TGLOrthoCamera.cxx:247
 TGLOrthoCamera.cxx:248
 TGLOrthoCamera.cxx:249
 TGLOrthoCamera.cxx:250
 TGLOrthoCamera.cxx:251
 TGLOrthoCamera.cxx:252
 TGLOrthoCamera.cxx:253
 TGLOrthoCamera.cxx:254
 TGLOrthoCamera.cxx:255
 TGLOrthoCamera.cxx:256
 TGLOrthoCamera.cxx:257
 TGLOrthoCamera.cxx:258
 TGLOrthoCamera.cxx:259
 TGLOrthoCamera.cxx:260
 TGLOrthoCamera.cxx:261
 TGLOrthoCamera.cxx:262
 TGLOrthoCamera.cxx:263
 TGLOrthoCamera.cxx:264
 TGLOrthoCamera.cxx:265
 TGLOrthoCamera.cxx:266
 TGLOrthoCamera.cxx:267
 TGLOrthoCamera.cxx:268
 TGLOrthoCamera.cxx:269
 TGLOrthoCamera.cxx:270
 TGLOrthoCamera.cxx:271
 TGLOrthoCamera.cxx:272
 TGLOrthoCamera.cxx:273
 TGLOrthoCamera.cxx:274
 TGLOrthoCamera.cxx:275
 TGLOrthoCamera.cxx:276
 TGLOrthoCamera.cxx:277
 TGLOrthoCamera.cxx:278
 TGLOrthoCamera.cxx:279
 TGLOrthoCamera.cxx:280
 TGLOrthoCamera.cxx:281
 TGLOrthoCamera.cxx:282
 TGLOrthoCamera.cxx:283
 TGLOrthoCamera.cxx:284
 TGLOrthoCamera.cxx:285
 TGLOrthoCamera.cxx:286
 TGLOrthoCamera.cxx:287
 TGLOrthoCamera.cxx:288
 TGLOrthoCamera.cxx:289
 TGLOrthoCamera.cxx:290
 TGLOrthoCamera.cxx:291
 TGLOrthoCamera.cxx:292
 TGLOrthoCamera.cxx:293
 TGLOrthoCamera.cxx:294
 TGLOrthoCamera.cxx:295
 TGLOrthoCamera.cxx:296
 TGLOrthoCamera.cxx:297
 TGLOrthoCamera.cxx:298
 TGLOrthoCamera.cxx:299
 TGLOrthoCamera.cxx:300
 TGLOrthoCamera.cxx:301
 TGLOrthoCamera.cxx:302
 TGLOrthoCamera.cxx:303
 TGLOrthoCamera.cxx:304
 TGLOrthoCamera.cxx:305
 TGLOrthoCamera.cxx:306
 TGLOrthoCamera.cxx:307
 TGLOrthoCamera.cxx:308
 TGLOrthoCamera.cxx:309
 TGLOrthoCamera.cxx:310
 TGLOrthoCamera.cxx:311
 TGLOrthoCamera.cxx:312
 TGLOrthoCamera.cxx:313
 TGLOrthoCamera.cxx:314
 TGLOrthoCamera.cxx:315
 TGLOrthoCamera.cxx:316
 TGLOrthoCamera.cxx:317
 TGLOrthoCamera.cxx:318
 TGLOrthoCamera.cxx:319
 TGLOrthoCamera.cxx:320
 TGLOrthoCamera.cxx:321
 TGLOrthoCamera.cxx:322
 TGLOrthoCamera.cxx:323