|
1 | | -# collisiongrid |
| 1 | +``` |
| 2 | +/************************************************************************** |
| 3 | + * |
| 4 | + * by Unterrainer Informatik OG. |
| 5 | + * This is free and unencumbered software released into the public domain. |
| 6 | + * Anyone is free to copy, modify, publish, use, compile, sell, or |
| 7 | + * distribute this software, either in source code form or as a compiled |
| 8 | + * binary, for any purpose, commercial or non-commercial, and by any |
| 9 | + * means. |
| 10 | + * |
| 11 | + * In jurisdictions that recognize copyright laws, the author or authors |
| 12 | + * of this software dedicate any and all copyright interest in the |
| 13 | + * software to the public domain. We make this dedication for the benefit |
| 14 | + * of the public at large and to the detriment of our heirs and |
| 15 | + * successors. We intend this dedication to be an overt act of |
| 16 | + * relinquishment in perpetuity of all present and future rights to this |
| 17 | + * software under copyright law. |
| 18 | + * |
| 19 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 | + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 | + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 22 | + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 23 | + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 24 | + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 25 | + * OTHER DEALINGS IN THE SOFTWARE. |
| 26 | + * |
| 27 | + * For more information, please refer to <http://unlicense.org> |
| 28 | + * |
| 29 | + * (In other words you may copy, use, change, redistribute and sell it without |
| 30 | + * any restrictions except for not suing me because it broke something.) |
| 31 | + * |
| 32 | + ***************************************************************************/ |
| 33 | +
|
| 34 | +``` |
| 35 | + |
| 36 | +# General |
| 37 | + |
| 38 | +This section contains various useful projects that should help your development-process. |
| 39 | + |
| 40 | +This section of our GIT repositories is free. You may copy, use or rewrite every single one of its contained projects to your hearts content. |
| 41 | +In order to get help with basic GIT commands you may try [the GIT cheat-sheet][coding] on our [homepage][homepage]. |
| 42 | + |
| 43 | +This repository located on our [homepage][homepage] is private since this is the master- and release-branch. You may clone it, but it will be read-only. |
| 44 | +If you want to contribute to our repository (push, open pull requests), please use the copy on github located here: [the public github repository][github] |
| 45 | + |
| 46 | +# CollisionGrid |
| 47 | + |
| 48 | +This class implements a collision-grid. |
| 49 | +When doing game development you've all come across a point when you'd like to do some collision-checks and that's usually the time when you realize that just checking all sprites against each other just doesn't cut it. |
| 50 | +The problem is that the number of checks grow very fast (N² for N sprites) when the number of your sprites grow. |
| 51 | + |
| 52 | +![Position Test][testposition] |
| 53 | + |
| 54 | +![Rectangle Test][testrectangle] |
| 55 | + |
| 56 | +#### Example |
| 57 | + |
| 58 | +```csharp |
| 59 | + |
| 60 | +``` |
| 61 | + |
| 62 | +[homepage]: http://www.unterrainer.info |
| 63 | +[coding]: http://www.unterrainer.info/Home/Coding |
| 64 | +[github]: https://github.com/UnterrainerInformatik/collisiongrid |
| 65 | +[testrectangle]: https://github.com/UnterrainerInformatik/collisiongrid/testrectangle.gif |
| 66 | +[testposition]: https://github.com/UnterrainerInformatik/collisiongrid/testposition.gif |
0 commit comments