/* * main - this is the main programme. */ int main () { #ifdef ENABLE_SIGFPE feenableexcept(FE_ALL_EXCEPT & ~FE_INEXACT); #endif TestMaterial universe = TestMaterial(NON_STP_BV_OBJECTS ); universe.initializeUniverse(); universe.TestAnimation(); return 0; }
/* * main - this is the main programme. */ int main () { #ifdef ENABLE_SIGFPE feenableexcept(FE_ALL_EXCEPT & ~FE_INEXACT); #endif TestMaterial universe = TestMaterial(); //No other objects than STP-BVs universe.initializeUniverse(); universe.TestAnimation(); return 0; }
static void keyPress (unsigned char key, int /*x*/, int /*y*/) { static int lightOn = 1; /* update key state */ keyboard.keymap[key] = 1; /* * handle here ponctual actions when * a key is pressed (like toggle ligthing) */ /* escape */ switch (key) { case 27: exit (0); break; /* 'l': toggle light */ case 'l': lightOn = !lightOn; break; case 32: universe.CurrentObj=(universe.CurrentObj+1)%universe.sObj.size(); break; case 8: universe.CurrentObj=(universe.CurrentObj-1)%universe.sObj.size(); break; case '0': universe.RandomTestSupportFunction(); break; case '1': universe.TestAnimation(); break; case '2': universe.TestPrecision(); break; case '3': universe.RandomTestSupportFunctionAllObjects(); break; case '5': universe.GeneralTest(); break; } if (lightOn) glEnable (GL_LIGHTING); else glDisable (GL_LIGHTING); glutPostRedisplay (); }