Skip to content

Commit

Permalink
readme update: spaceball no longer UNIX-only
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsiomb committed Jul 10, 2024
1 parent 631ccc4 commit 39655f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ Missing GLUT features:
- Some of the primitives.
- Buttons and Dials callbacks.
- Tablet callbacks.
- Spaceball callbacks are only implemented on UNIX/X11.
- Timer callback.

Missing FreeGLUT features:
Expand Down
8 changes: 4 additions & 4 deletions test.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ void motion(int x, int y)

void sball_motion(int x, int y, int z)
{
torus_pos[0] += x * 0.001f;
torus_pos[1] += y * 0.001f;
torus_pos[2] -= z * 0.001f;
torus_pos[0] += x * 0.0001f;
torus_pos[1] += y * 0.0001f;
torus_pos[2] -= z * 0.0001f;
glutPostRedisplay();
}

Expand All @@ -281,7 +281,7 @@ void sball_rotate(int rx, int ry, int rz)
{
if(rx | ry | rz) {
float s = (float)rsqrt(rx * rx + ry * ry + rz * rz);
qrotate(torus_rot, 0.001f / s, rx * s, ry * s, -rz * s);
qrotate(torus_rot, 0.0001f / s, rx * s, ry * s, -rz * s);
glutPostRedisplay();
}
}
Expand Down

0 comments on commit 39655f8

Please sign in to comment.