[artoolkit-commits] artoolkit/examples/simpleLite simpleLite.c, 1.23, 1.24
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2007-03-20 04:28:58
|
Update of /cvsroot/artoolkit/artoolkit/examples/simpleLite In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28588/examples/simpleLite Modified Files: simpleLite.c Log Message: Updated copyright date. Add threshhold adjustment to simpleLite. Index: simpleLite.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/examples/simpleLite/simpleLite.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** simpleLite.c 23 Jan 2007 00:39:27 -0000 1.23 --- simpleLite.c 20 Mar 2007 04:28:56 -0000 1.24 *************** *** 242,246 **** static void Keyboard(unsigned char key, int x, int y) { ! int mode; switch (key) { case 0x1B: // Quit. --- 242,247 ---- static void Keyboard(unsigned char key, int x, int y) { ! int mode, threshChange = 0; ! switch (key) { case 0x1B: // Quit. *************** *** 268,271 **** --- 269,279 ---- debugReportMode(gArglSettings); break; + case '-': + threshChange = -5; + break; + case '+': + case '=': + threshChange = +5; + break; case 'D': case 'd': *************** *** 277,280 **** --- 285,289 ---- printf(" q or [esc] Quit demo.\n"); printf(" c Change arglDrawMode and arglTexmapMode.\n"); + printf(" - and + Adjust threshhold.\n"); printf(" d Activate / deactivate debug mode.\n"); printf(" ? or / Show this help.\n"); *************** *** 285,288 **** --- 294,303 ---- break; } + if (threshChange) { + gARTThreshhold += threshChange; + if (gARTThreshhold < 0) gARTThreshhold = 0; + if (gARTThreshhold > 255) gARTThreshhold = 255; + printf("Threshhold changed to %d.\n", gARTThreshhold); + } } |