aschearer (owner)

Revisions

gist: 219172 Download_button fork
public
Public Clone URL: git://gist.github.com/219172.git
Embed All Files: show embed
Collider.java #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* A physical entity which can be collided.
*/
interface Body
{
  
}
 
/**
* Event listener which handles collisions between bodies.
*/
interface CollisionHandler
{
  void onCollision(Body one, Body two);
}
 
/**
* A collection of bodies which can perform physical queries.
*/
interface Collider
{
  Body[] getNeighbors(Body value);
  Body[] getIntersecting(Body value);
  void sweepForIntersections(CollisionHandler resolver);
}