CollisionResultSet Class Reference

#include <rimCollisionResultSet.h>

List of all members.

Public Member Functions

 CollisionResultSet ()
 CollisionResultSet (const CollisionResultSet &resultSet)
 ~CollisionResultSet ()
CollisionResultSetoperator= (const CollisionResultSet &resultSet)
 Assign the contents of one collision result set to another.
CollisionManifoldaddManifold (RigidObject *object1, RigidObject *object2)
CollisionManifoldgetManifold (RigidObject *object1, RigidObject *object2)
const CollisionManifoldgetManifold (RigidObject *object1, RigidObject *object2) const
void setManifold (RigidObject *object1, RigidObject *object2, const CollisionManifold &manifold)
bool areColliding (RigidObject *object1, RigidObject *object2)
ArrayList< const
CollisionResult * > 
getObjectCollisions (RigidObject *object)
void markResultsAsOld ()
void clearOldResults ()
int getNumberOfResults () const
const CollisionResultgetResult (int index) const
CollisionResultgetResult (int index)
void clearResults ()
float getLoadFactor () const
void setLoadFactor (float newLoadFactor)

Private Member Functions

CollisionResultaddResult (RigidObject *object1, RigidObject *object2)
CollisionResultaddResult (RigidObject *object1, RigidObject *object2, const CollisionManifold &manifold)
void checkLoadFactor ()

Static Private Member Functions

static Hash nextPrime (Hash n)

Private Attributes

CollisionResultBucketbuckets
Hash numBuckets
float loadFactor
CollisionResult ** results
int numResults
int resultArraySize

Static Private Attributes

static const Hash DEFAULT_RESULT_HASH_TABLE_SIZE = 193
static const int NUMBER_OF_PRIMES = 28
static const Hash PRIMES [NUMBER_OF_PRIMES]
static const int DEFAULT_RESULT_ARRAY_SIZE = 128
static const float DEFAULT_LOAD_FACTOR = 0.5f

Classes

struct  CollisionResultBucket


Constructor & Destructor Documentation

CollisionResultSet::CollisionResultSet (  )  [inline]

CollisionResultSet::CollisionResultSet ( const CollisionResultSet resultSet  )  [inline]

CollisionResultSet::~CollisionResultSet (  )  [inline]


Member Function Documentation

CollisionResultSet& CollisionResultSet::operator= ( const CollisionResultSet resultSet  )  [inline]

Assign the contents of one collision result set to another.

CollisionManifold& CollisionResultSet::addManifold ( RigidObject object1,
RigidObject object2 
) [inline]

CollisionManifold& CollisionResultSet::getManifold ( RigidObject object1,
RigidObject object2 
) [inline]

const CollisionManifold& CollisionResultSet::getManifold ( RigidObject object1,
RigidObject object2 
) const [inline]

void CollisionResultSet::setManifold ( RigidObject object1,
RigidObject object2,
const CollisionManifold manifold 
) [inline]

bool CollisionResultSet::areColliding ( RigidObject object1,
RigidObject object2 
) [inline]

ArrayList<const CollisionResult*> CollisionResultSet::getObjectCollisions ( RigidObject object  )  [inline]

void CollisionResultSet::markResultsAsOld (  )  [inline]

void CollisionResultSet::clearOldResults (  )  [inline]

int CollisionResultSet::getNumberOfResults (  )  const [inline]

const CollisionResult& CollisionResultSet::getResult ( int  index  )  const [inline]

CollisionResult& CollisionResultSet::getResult ( int  index  )  [inline]

void CollisionResultSet::clearResults (  )  [inline]

float CollisionResultSet::getLoadFactor (  )  const [inline]

void CollisionResultSet::setLoadFactor ( float  newLoadFactor  )  [inline]

CollisionResult* CollisionResultSet::addResult ( RigidObject object1,
RigidObject object2 
) [inline, private]

CollisionResult* CollisionResultSet::addResult ( RigidObject object1,
RigidObject object2,
const CollisionManifold manifold 
) [inline, private]

void CollisionResultSet::checkLoadFactor (  )  [inline, private]

static Hash CollisionResultSet::nextPrime ( Hash  n  )  [inline, static, private]


Member Data Documentation

CollisionResultBucket* CollisionResultSet::buckets [private]

Hash CollisionResultSet::numBuckets [private]

float CollisionResultSet::loadFactor [private]

CollisionResult** CollisionResultSet::results [private]

int CollisionResultSet::numResults [private]

int CollisionResultSet::resultArraySize [private]

const Hash CollisionResultSet::DEFAULT_RESULT_HASH_TABLE_SIZE = 193 [static, private]

const int CollisionResultSet::NUMBER_OF_PRIMES = 28 [static, private]

const Hash CollisionResultSet::PRIMES [static, private]

Initial value:

{
        11,                             
        23,                             
        53,                             
        97,                             
        193,                    
        389,                    
        769,                    
        1543,                   
        3079,                   
        6151,                   
        12289,                  
        24593,                  
        49157,                  
        98317,                  
        196613,                 
        393241,                 
        786433,                 
        1572869,                
        3145739,                
        6291469,                
        12582917,               
        25165843,               
        50331653,               
        100663319,              
        201326611,              
        402653189,              
}

const int CollisionResultSet::DEFAULT_RESULT_ARRAY_SIZE = 128 [static, private]

RIM_PHYSICS_NAMESPACE_START const float CollisionResultSet::DEFAULT_LOAD_FACTOR = 0.5f [static, private]


The documentation for this class was generated from the following files:
Generated on Tue Aug 26 00:03:18 2008 for Rim Physics by  doxygen 1.5.4