Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Bolt::CollideKey Class Reference

A class that allows Collidable s to be sorted quickly. More...

#include <bolt.h>

List of all members.

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...


Detailed Description

A class that allows Collidable s to be sorted quickly.

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 & Destructor Documentation

Bolt::CollideKey::CollideKey double    r [inline]
 

Constructor that only takes in the radius and sets its variables.

Bolt::CollideKey::CollideKey int    s,
double    r
[inline]
 

Constructor that takes in the radius and a Surface , but does nothing with the Surface .


Member Function Documentation

bool Bolt::CollideKey::operator< const CollideKey &    b const [inline]
 

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         }


Member Data Documentation

double Bolt::CollideKey::radius
 

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.


The documentation for this class was generated from the following file:
Generated on Mon Jul 7 21:13:51 2003 for Ethereal by doxygen1.2.15