CollisionConstraint Class Reference

#include <rimCollisionConstraint.h>

Inheritance diagram for CollisionConstraint:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CollisionConstraint ()
virtual ~CollisionConstraint ()
 destroy a physics constraint.
virtual void setUpConstraint (Real dt)
 Set up the constraint so that it can be solved.
virtual void performIteration ()
 Do one iteration of the constraint.
virtual void cleanUpConstraint ()
 Clean up any waste created during constraint iterations.
virtual const ConstraintTypegetType () const
const CollisionResultSetgetCollisionResultSet () const
CollisionResultSetgetCollisionResultSet ()

Static Private Member Functions

static Hash nextPrime (Hash n)
 Find the first prime larger than the parameter in the class's static array of primes.

Private Attributes

ConstraintInstanceBucketconstraintHashTable
Hash constraintHashTableSize
int numConstraints
Real loadFactor
CollisionResultSet collisionResultSet

Static Private Attributes

static const ConstraintType constraintType = "Collision"
 The constraint type object that describes all instances of this class.
static const Hash DEFAULT_CONSTRAINT_HASH_TABLE_SIZE = 193
 The default number of buckets in the constraint hash table.
static const int NUMBER_OF_PRIMES = 28
 The number of elements in the array of prime numbers which are used as hash table sizes.
static const Hash PRIMES [NUMBER_OF_PRIMES]
 An array of optimal hash table sizes, chosen to be prime numbers far from a power of 2.
static const Real DEFAULT_LOAD_FACTOR = Real(0.5)
 The default load factor of the collision constraint hash table.

Classes

struct  ConstraintInstanceBucket


Constructor & Destructor Documentation

RIM_PHYSICS_NAMESPACE_START CollisionConstraint::CollisionConstraint (  ) 

CollisionConstraint::~CollisionConstraint (  )  [virtual]

destroy a physics constraint.


Member Function Documentation

void CollisionConstraint::setUpConstraint ( Real  dt  )  [virtual]

Set up the constraint so that it can be solved.

Implements Constraint.

void CollisionConstraint::performIteration (  )  [virtual]

Do one iteration of the constraint.

Implements Constraint.

void CollisionConstraint::cleanUpConstraint (  )  [virtual]

Clean up any waste created during constraint iterations.

Implements Constraint.

virtual const ConstraintType& CollisionConstraint::getType (  )  const [inline, virtual]

Implements Constraint.

const CollisionResultSet& CollisionConstraint::getCollisionResultSet (  )  const [inline]

CollisionResultSet& CollisionConstraint::getCollisionResultSet (  )  [inline]

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

Find the first prime larger than the parameter in the class's static array of primes.


Member Data Documentation

ConstraintInstanceBucket* CollisionConstraint::constraintHashTable [private]

Hash CollisionConstraint::constraintHashTableSize [private]

int CollisionConstraint::numConstraints [private]

Real CollisionConstraint::loadFactor [private]

CollisionResultSet CollisionConstraint::collisionResultSet [private]

const ConstraintType CollisionConstraint::constraintType = "Collision" [static, private]

The constraint type object that describes all instances of this class.

const Hash CollisionConstraint::DEFAULT_CONSTRAINT_HASH_TABLE_SIZE = 193 [static, private]

The default number of buckets in the constraint hash table.

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

The number of elements in the array of prime numbers which are used as hash table sizes.

const Hash CollisionConstraint::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,              
}
An array of optimal hash table sizes, chosen to be prime numbers far from a power of 2.

const Real CollisionConstraint::DEFAULT_LOAD_FACTOR = Real(0.5) [static, private]

The default load factor of the collision constraint hash table.


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