Laser Sensing Display for UI interfaces in the real world
Fork of skinGames_forktest by
Diff: classLaserSensingTrajectory.h
- Revision:
- 10:6f8e48dca1bd
- Parent:
- 9:3321170d157c
- Child:
- 11:62f7183a03e7
--- a/classLaserSensingTrajectory.h Wed Apr 11 13:06:23 2012 +0000 +++ b/classLaserSensingTrajectory.h Wed Apr 11 14:51:08 2012 +0000 @@ -13,7 +13,7 @@ unsigned short x, y; // position of the point (after rendering - its integer, because it is in "laser projector pixels") // char color; // laser color of the point (we will use the first three bits to set the RGB colors) // Detection: - float intensity; // detected intensity + unsigned char intensity; // detected intensity (in fact, this will be the REFLECTIVITY RATIO if using LUT table, and it's between 0 and 1, but we will multiply by 255 to avoid using a float. char lightZone; // the thresholded light zone (allow for negative values for simply computing "negative" forces - although this is not necessarily the best option) }; @@ -34,14 +34,14 @@ char displayColor; // software adjustement of mirror delay: - int delayMirrorSamples; // this is required because it will affect the way the blob behaves - it could be in the laser renderer, but by putting it here we can have more per-blob fine tunning + unsigned char delayMirrorSamples; // this is required because it will affect the way the blob behaves - it could be in the laser renderer, but by putting it here we can have more per-blob fine tunning // parameters for thresholding: - float autoThreshold; + unsigned char autoThreshold; // can be negative // Statistics and tests: //float lightRatio; - float maxI, minI; // Max and Min intensity + unsigned char maxI, minI; // Max and Min intensity RATIOS (normalized between 0 and 255) bool lightTouched; // true if something went over the autoThreshold for the whole loop // char coko; };