static void idle()
{
// static float lightVelocity = 0.008;
// static float timeFlow = 0.01;
/* Repeat rotating light around front 180 degrees. */
if (myLightAngle > Math.PI / 2)
{
myLightAngle = (float)Math.PI / 2;
lightVelocity = -lightVelocity;
}
else if (myLightAngle < -Math.PI / 2)
{
myLightAngle = (float)-Math.PI / 2;
lightVelocity = -lightVelocity;
}
myLightAngle += lightVelocity; /* Add a small angle (in radians). */
/* Repeatedly advance and rewind time. */
if (myTime > 10)
{
myTime = 10;
timeFlow = -timeFlow;
}
else if (myTime < 0)
{
myTime = 0;
timeFlow = -timeFlow;
}
myTime += timeFlow; /* Add time delta. */
Glut.glutPostRedisplay();
}