#include <bolt.h>
Public Methods | |
CollideKey (double r) | |
Constructor that only takes in the radius and sets its variables. More... | |
CollideKey (int s, double r) | |
Constructor that takes in the radius and a Surface , but does nothing with the Surface . More... | |
bool | operator< (const CollideKey &b) const |
This function checks if two CollideKey s are less than each other. This function is manditory for sorting. More... | |
Public Attributes | |
double | radius |
This is the key within a surface that says how far from the "center" of the Surface the Collidable is. More... |
CollideKey is a class that holds information allowing two Collidable objects to be sorted so that it is easy to narrow down objects which are next to each other. This class is used later in IdTable in order to sort COlidable s.
|
Constructor that only takes in the radius and sets its variables.
|
|
Constructor that takes in the radius and a Surface , but does nothing with the Surface .
|
|
This function checks if two CollideKey s are less than each other. This function is manditory for sorting. The function only must check the two radii (since it only has one key)
00018 { 00019 return radius<b.radius; 00020 } |
|
This is the key within a surface that says how far from the "center" of the Surface the Collidable is. Note: This must be a double because of accuracy issues with large numbers. |