#else
#include <GL/glut.h>
#endif
+#include "app.h"
#include "machine.h"
bool init();
void mouse(int bn, int st, int x, int y);
void motion(int x, int y);
-static float cam_dist = 2;
+static float cam_dist = 0.5;
static float cam_theta, cam_phi;
static int prev_mx, prev_my;
static bool bnstate[8];
void draw_gears()
{
- /* world scale is in meters, gears are in millimeters, sclae by 1/1000 */
+ /* world scale is in meters, gears are in millimeters, scale by 1/1000 */
glPushMatrix();
glScalef(0.001, 0.001, 0.001);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- gluPerspective(50.0, (float)x / (float)y, 0.05, 100.0);
+ gluPerspective(50.0, (float)x / (float)y, 0.01, 100.0);
}
void keyb(unsigned char key, int x, int y)
switch(key) {
case 27:
exit(0);
+
+ case 'w':
+ opt_gear_wireframe = !opt_gear_wireframe;
+ glutPostRedisplay();
+ break;
}
}