Script showing how to use the GL viewer API to animate a picture.
void AnimateCamera()
{
static Double_t center[3] = {-164.0, -164.0, -180.0};
static Double_t fovStep = randGen.Rndm()*3.0 - 0.5;
static Double_t zoomStep = (20 - randGen.Rndm())/1000.;
static Double_t dollyStep = randGen.Rndm()*5.0 - 1.0;
static Double_t centerStep[3] = {randGen.Rndm()*4, randGen.Rndm()*4,
randGen.Rndm()*4 };
static Double_t hRotateStep = randGen.Rndm()*0.025;
static Double_t vRotateStep = randGen.Rndm()*0.05;
center[0] += centerStep[0];
center[1] += centerStep[1];
center[2] += centerStep[2];
center[2]*center[2]);
if(mag > 500)
{
centerStep[0] = -centerStep[0];
centerStep[1] = -centerStep[1];
centerStep[2] = -centerStep[2];
}
hRotate += hRotateStep;
vRotate += vRotateStep;
vRotateStep = -vRotateStep;
hRotateStep = -hRotateStep;
}
dolly += dollyStep;
if (dolly >= 2000.0 || dolly <= 1500.0)
dollyStep = -dollyStep;
if(camera < 3)
{
fov += fovStep;
if (fov > 130.0 || fov < 5.0)
fovStep = - fovStep; }
else
{
zoom += zoomStep;
if (zoom > 4.0 || zoom < 0.25)
zoomStep = - zoomStep;
}
if(camera < 3)
vRotateStep);
else
vRotateStep);
if (++moveCount % 10 == 0)
}
void glViewerExercise()
{
gROOT->ProcessLine(
".x nucleus.C");
switch (style)
{
}
if (randGen.Integer(2) == 0)
if (randGen.Integer(2) == 0)
if (randGen.Integer(2) == 0)
if (randGen.Integer(2) == 0)
Int_t id = randGen.Integer(6);
if (id > 2) {
}
if (sav)
}