Advertisement
Guest User

intersect.h

a guest
May 29th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. /*
  2.  * ______________________ _______    ________ ___  ___
  3.  * \__    ___/\_   _____/ \      \  /  _____/|   | |  \
  4.  *   |    |    |    __)_  /   |   \/   \  ___|   | |  |
  5.  *   |    |    |        \/    |    \    \_\  \   |_|  |
  6.  *   |____|   /_______  /\____|__  /\______  /________/
  7.  * Game Engine.       \/         \/        \/          
  8.  *
  9.  * (c) 8BitPimp (2013)
  10.  */
  11. #include "common.h"
  12.  
  13. //
  14. struct sRayBox
  15. {
  16.     // ray
  17.     float x1, y1;
  18.     float x2, y2;
  19.     // box
  20.     float bx, by;
  21.     float bw, bh;
  22.     // intersection
  23.     float ix, iy;
  24. };
  25.  
  26. //
  27. // if [x1,y1] lies inside the box then this will fail
  28. //
  29. //
  30. extern bool intersect_line_box
  31. (
  32.     sRayBox *i
  33. );
  34.  
  35. //
  36. extern bool intersect_ray_box
  37. (
  38.     sRayBox *i
  39. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement