a simple particle system on processing conroled by leap motion.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Point.pde 477B

1234567891011121314151617181920212223242526272829303132
  1. public class Point
  2. {
  3. public int x;
  4. public int y;
  5. public int r;
  6. public int g;
  7. public int b;
  8. public int col;
  9. Point(int in_x, int in_y, int c)
  10. {
  11. x = in_x;
  12. y = in_y;
  13. r = (c >> 16) & 0xFF;
  14. g = (c >> 8) & 0xFF;
  15. b = (c >> 0) & 0xFF;
  16. col = c;
  17. }
  18. Point(int in_x, int in_y, int col_r, int col_g, int col_b)
  19. {
  20. x = in_x;
  21. y = in_y;
  22. r = col_r & 0xFF;
  23. g = col_g & 0xFF;
  24. b = col_b & 0xFF;
  25. col = (r & 0xFF) << 16| ((g & 0xFF) << 8) | ((b & 0xFF));
  26. }
  27. }