27 static Double_t center[3] = {-164.0, -164.0, -180.0};
31 static Double_t fovStep = randGen.Rndm()*3.0 - 0.5;
32 static Double_t zoomStep = (20 - randGen.Rndm())/1000.;
33 static Double_t dollyStep = randGen.Rndm()*5.0 - 1.0;
34 static Double_t centerStep[3] = {randGen.Rndm()*4, randGen.Rndm()*4,
36 static Double_t hRotateStep = randGen.Rndm()*0.025;
37 static Double_t vRotateStep = randGen.Rndm()*0.05;
40 center[0] += centerStep[0];
41 center[1] += centerStep[1];
42 center[2] += centerStep[2];
47 centerStep[0] = -centerStep[0];
48 centerStep[1] = -centerStep[1];
49 centerStep[2] = -centerStep[2];
53 hRotate += hRotateStep;
54 vRotate += vRotateStep;
56 vRotateStep = -vRotateStep;
60 hRotateStep = -hRotateStep;
65 if (dolly >= 2000.0 || dolly <= 1500.0)
66 dollyStep = -dollyStep;
73 if (fov > 130.0 || fov < 5.0)
74 fovStep = - fovStep; }
78 if (zoom > 4.0 || zoom < 0.25)
79 zoomStep = - zoomStep;
90 if (++moveCount % 10 == 0)
94 void glViewerExercise()
96 gROOT->ProcessLine(
".x nucleus.C");
110 if (randGen.Integer(2) == 0)
112 if (randGen.Integer(2) == 0)
114 if (randGen.Integer(2) == 0)
116 if (randGen.Integer(2) == 0)
120 Int_t id = randGen.Integer(6);
134 timer.SetCommand(
"AnimateCamera()");
void SetLight(ELight light, Bool_t on)
Set a light on/off.
constexpr Double_t TwoPi()
Encapsulates a set of lights for OpenGL.
void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Set an orthographic camera to supplied configuration - note this does not need to be the current came...
void SetEnableRotate(Bool_t x)
TGLCamera & CurrentCamera() const
This is the base class for the ROOT Random number generators.
The top level standalone GL-viewer - created via plugin manager.
void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Set a perspective camera to supplied configuration - note this does not need to be the current camera...
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void SetExternalCenter(Bool_t x)
Set camera center diffrent than scene center, if enable is kTRUE.
Handles synchronous and a-synchronous timer events.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
void SetCurrentCamera(ECameraType camera)
Set current active camera - 'cameraType' one of: kCameraPerspX, kCameraPerspY, kCameraPerspZ, kCameraOrthoXOY, kCameraOrthoXOZ, kCameraOrthoZOY, kCameraOrthoXnOY, kCameraOrthoXnOZ, kCameraOrthoZnOY.
TGCompositeFrame * GetFrame() const
Return the main-frame.
TGLLightSet * GetLightSet() const
Orthographic projection camera.
virtual void RefreshPadEditor(TObject *obj=0)
Update GED editor if it is set.
Double_t Sqrt(Double_t x)
constexpr Double_t PiOver2()
void SetStyle(Short_t st)