gil_mouseover_polygon4.pd 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #N canvas 326 76 832 567 10;
  2. #X obj 38 136 t l l;
  3. #X obj 38 463 outlet cursor-list;
  4. #X obj 38 105 inlet cursor-list;
  5. #X text 403 68 (c)2011 Marian Weger /part of GIL/;
  6. #X obj 405 12 cnv 15 220 50 empty empty HELP? 20 12 0 14 -261234 -258113
  7. 0;
  8. #X text 406 39 for further help: see [gil_example];
  9. #X obj 65 159 s \$0-cursor-list;
  10. #X obj 670 21 loadbang;
  11. #X obj 670 41 float \$1;
  12. #X obj 670 61 sel 0;
  13. #X msg 670 84 1000;
  14. #X obj 697 133 s \$0-test;
  15. #X text 269 431 The cursor C is inside a polygon \, if the line segment
  16. CD to a point outside the polygon is crossing an uneven number of sides
  17. of the polygon. This is always true for all kinds of polygons.;
  18. #X text 31 47 calculates \, if the cursor lies inside a given 4-point
  19. polygon.;
  20. #X obj 75 320 gil_line&line;
  21. #X obj 206 105 inlet BL;
  22. #X obj 206 125 s \$0-BL;
  23. #X obj 266 105 inlet BR;
  24. #X obj 266 125 s \$0-BR;
  25. #X obj 326 105 inlet TR;
  26. #X obj 326 125 s \$0-TR;
  27. #X obj 386 105 inlet TL;
  28. #X obj 386 125 s \$0-TL;
  29. #X obj 186 296 r \$0-test;
  30. #X msg 697 110 \$1 \$1;
  31. #X obj 149 274 r \$0-cursor-list;
  32. #X obj 75 234 r \$0-BL;
  33. #X obj 112 254 r \$0-BR;
  34. #X obj 255 320 gil_line&line;
  35. #X obj 366 296 r \$0-test;
  36. #X obj 329 274 r \$0-cursor-list;
  37. #X obj 435 320 gil_line&line;
  38. #X obj 546 296 r \$0-test;
  39. #X obj 509 274 r \$0-cursor-list;
  40. #X obj 615 320 gil_line&line;
  41. #X obj 726 296 r \$0-test;
  42. #X obj 689 274 r \$0-cursor-list;
  43. #X obj 255 234 r \$0-BR;
  44. #X obj 292 254 r \$0-TR;
  45. #X obj 435 234 r \$0-TR;
  46. #X obj 472 254 r \$0-TL;
  47. #X obj 615 234 r \$0-TL;
  48. #X obj 652 254 r \$0-BL;
  49. #X obj 356 369 +;
  50. #X obj 366 344 t b f;
  51. #X obj 716 369 +;
  52. #X obj 726 344 t b f;
  53. #X obj 705 423 +;
  54. #X obj 716 398 t b f;
  55. #X obj 705 447 mod 2;
  56. #X obj 705 474 outlet mouseover;
  57. #X text 31 17 gil_mouseover_polygon4 <test point position D (optional)>
  58. ;
  59. #X text 433 176 D is set to (1000 / 1000) by default \, what should
  60. be always outside the polygon.;
  61. #X connect 0 0 1 0;
  62. #X connect 0 1 6 0;
  63. #X connect 2 0 0 0;
  64. #X connect 7 0 8 0;
  65. #X connect 8 0 9 0;
  66. #X connect 9 0 10 0;
  67. #X connect 9 1 24 0;
  68. #X connect 10 0 24 0;
  69. #X connect 14 2 43 0;
  70. #X connect 15 0 16 0;
  71. #X connect 17 0 18 0;
  72. #X connect 19 0 20 0;
  73. #X connect 21 0 22 0;
  74. #X connect 23 0 14 3;
  75. #X connect 24 0 11 0;
  76. #X connect 25 0 14 2;
  77. #X connect 26 0 14 0;
  78. #X connect 27 0 14 1;
  79. #X connect 28 2 44 0;
  80. #X connect 29 0 28 3;
  81. #X connect 30 0 28 2;
  82. #X connect 31 2 45 0;
  83. #X connect 32 0 31 3;
  84. #X connect 33 0 31 2;
  85. #X connect 34 2 46 0;
  86. #X connect 35 0 34 3;
  87. #X connect 36 0 34 2;
  88. #X connect 37 0 28 0;
  89. #X connect 38 0 28 1;
  90. #X connect 39 0 31 0;
  91. #X connect 40 0 31 1;
  92. #X connect 41 0 34 0;
  93. #X connect 42 0 34 1;
  94. #X connect 43 0 47 0;
  95. #X connect 44 0 43 0;
  96. #X connect 44 1 43 1;
  97. #X connect 45 0 48 0;
  98. #X connect 46 0 45 0;
  99. #X connect 46 1 45 1;
  100. #X connect 47 0 49 0;
  101. #X connect 48 0 47 0;
  102. #X connect 48 1 47 1;
  103. #X connect 49 0 50 0;