Public Member Functions

bl7::rigidbodies2::World Class Reference

#include <World.h>

List of all members.

Public Member Functions

 World (void)
 ~World (void)
float get_default_restitution () const
float get_default_static_friction () const
float get_default_kinetic_friction () const
float get_motion_epsilon () const
float get_tiredness_limit () const
unsigned get_max_contacts () const
float get_position_epsilon () const
float get_velocity_epsilon () const
unsigned get_max_position_iterations () const
unsigned get_max_velocity_iterations () const
void set_default_restitution (const float e)
void set_default_static_friction (const float fs)
void set_default_kinetic_friction (const float fk)
void set_motion_epsilon (const float motion_epsilon)
void set_tiredness_limit (const float tiredness_limit)
void set_max_contacts (const unsigned max_contacts)
void set_position_epsilon (const float epsilon)
void set_velocity_epsilon (const float epsilon)
void set_max_position_iterations (const unsigned iterations)
void set_max_velocity_iterations (const unsigned iterations)
const ContactRegistryget_contact_registry () const
bool contains_body (RigidBody *body) const
void add_body (RigidBody *body)
void remove_body (RigidBody *body)
void clear_bodies ()
bool contains_global_force_generator (ForceGenerator *generator) const
void add_global_force_generator (ForceGenerator *generator)
void remove_global_force_generator (ForceGenerator *generator)
void clear_global_force_generators ()
bool contains_permanent_force_generator (RigidBody *body, ForceGenerator *generator) const
void add_permanent_force_generator (RigidBody *body, ForceGenerator *generator)
void remove_permanent_force_generator (RigidBody *body, ForceGenerator *generator)
void clear_permanent_force_generators ()
bool contains_temporary_force_generator (RigidBody *body, ForceGenerator *generator) const
void add_temporary_force_generator (RigidBody *body, ForceGenerator *generator)
void remove_temporary_force_generator (RigidBody *body, ForceGenerator *generator)
void clear_temporary_force_generators ()
bool contains_contact_generator (ContactGenerator *generator) const
void add_contact_generator (ContactGenerator *generator)
void remove_contact_generator (ContactGenerator *generator)
void clear_contact_generators ()
void step (const float time)

Constructor & Destructor Documentation

bl7::rigidbodies2::World::World ( void   ) 

Default constructor.

bl7::rigidbodies2::World::~World ( void   ) 

Destructor.


Member Function Documentation

void bl7::rigidbodies2::World::add_body ( RigidBody body  ) 

Adds a given rigid body to this world. It it is already present, the function has no effect.

void bl7::rigidbodies2::World::add_contact_generator ( ContactGenerator generator  ) 

Adds a given contact generator to this world. It it is already present, the function has no effect.

void bl7::rigidbodies2::World::add_global_force_generator ( ForceGenerator generator  ) 

Adds a given force generator globally to this world. It it is already present, the function has no effect.

void bl7::rigidbodies2::World::add_permanent_force_generator ( RigidBody body,
ForceGenerator generator 
)

Adds a given pair of rigid body and force generator permanently to this world. It it is already present, the function has no effect.

void bl7::rigidbodies2::World::add_temporary_force_generator ( RigidBody body,
ForceGenerator generator 
)

Adds a given pair of rigid body and force generator temporarily to this world. It it is already present, the function has no effect.

void bl7::rigidbodies2::World::clear_bodies (  )  [inline]

Removes all rigid bodies form the world.

void bl7::rigidbodies2::World::clear_contact_generators (  )  [inline]

Removes all contact generators form this world.

void bl7::rigidbodies2::World::clear_global_force_generators (  )  [inline]

Removes all global force generators form this world.

void bl7::rigidbodies2::World::clear_permanent_force_generators (  )  [inline]

Removes all permanent pairs of rigid bodies and force generators form this world.

void bl7::rigidbodies2::World::clear_temporary_force_generators (  )  [inline]

Removes all temporary pairs of rigid bodies and force generators form this world.

bool bl7::rigidbodies2::World::contains_body ( RigidBody body  )  const [inline]

Checks whether a given rigid body is housed in this world.

bool bl7::rigidbodies2::World::contains_contact_generator ( ContactGenerator generator  )  const [inline]

Checks whether a given contact generator is contained in this world.

bool bl7::rigidbodies2::World::contains_global_force_generator ( ForceGenerator generator  )  const [inline]

Checks whether a given force generator is contained globally in this world.

bool bl7::rigidbodies2::World::contains_permanent_force_generator ( RigidBody body,
ForceGenerator generator 
) const [inline]

Checks whether a given pair of rigid body and force generator is contained permanently in this world.

bool bl7::rigidbodies2::World::contains_temporary_force_generator ( RigidBody body,
ForceGenerator generator 
) const [inline]

Checks whether a given pair of rigid body and force generator is contained temporarily in this world.

const ContactRegistry* bl7::rigidbodies2::World::get_contact_registry (  )  const [inline]
float bl7::rigidbodies2::World::get_default_kinetic_friction (  )  const

Returns the default kinetic friction.

float bl7::rigidbodies2::World::get_default_restitution (  )  const

Returns the default coefficient of restitution.

float bl7::rigidbodies2::World::get_default_static_friction (  )  const

Returns the default static friction.

unsigned bl7::rigidbodies2::World::get_max_contacts (  )  const

Returns the maximum number of rigid body contacts allowed. The default value is 1000.

unsigned bl7::rigidbodies2::World::get_max_position_iterations (  )  const

Returns the number of iterations used to resolve the rigid body contacts due to interpenetration. If it is set to 0 (it is by default), a default value of twice the number of generated rigid body contacts is taken.

unsigned bl7::rigidbodies2::World::get_max_velocity_iterations (  )  const

Returns the number of iterations used to resolve the rigid body contacts due to closing velocity. If it is set to 0 (it is by default), a default value of twice the number of generated rigid body contacts is taken.

float bl7::rigidbodies2::World::get_motion_epsilon (  )  const

Returns the lower bound of motion a rigid body can have without getting tired.

float bl7::rigidbodies2::World::get_position_epsilon (  )  const

Returns the epsilon value of minimum interpenetration depth.

float bl7::rigidbodies2::World::get_tiredness_limit (  )  const

Returns the limit of tiredness to be reached before a rigid body falls asleep.

float bl7::rigidbodies2::World::get_velocity_epsilon (  )  const

Returns the epsilon value of minimum closing speed.

void bl7::rigidbodies2::World::remove_body ( RigidBody body  ) 

Removes a given rigid body from this world. It it is not present, the function has no effect.

void bl7::rigidbodies2::World::remove_contact_generator ( ContactGenerator generator  ) 

Removes a given contact generator from this world. It it is not present, the function has no effect.

void bl7::rigidbodies2::World::remove_global_force_generator ( ForceGenerator generator  ) 

Removes a given global force generator from this world. It it is not present, the function has no effect.

void bl7::rigidbodies2::World::remove_permanent_force_generator ( RigidBody body,
ForceGenerator generator 
)

Removes a given permanent pair of rigid body and force generator from this world. It it is not present, the function has no effect.

void bl7::rigidbodies2::World::remove_temporary_force_generator ( RigidBody body,
ForceGenerator generator 
)

Removes a given temporary pair of rigid body and force generator from this world. It it is not present, the function has no effect.

void bl7::rigidbodies2::World::set_default_kinetic_friction ( const float  fk  ) 

Sets the default kinetic friction.

void bl7::rigidbodies2::World::set_default_restitution ( const float  e  ) 

Sets the default coefficient of restitution.

void bl7::rigidbodies2::World::set_default_static_friction ( const float  fs  ) 

Sets the default static friction.

void bl7::rigidbodies2::World::set_max_contacts ( const unsigned  max_contacts  ) 

Sets the maximum number of rigid body contacts allowed. The default value is 1000.

void bl7::rigidbodies2::World::set_max_position_iterations ( const unsigned  iterations  ) 

Sets the number of iterations used to resolve the rigid body contacts due to interpenetration. If it is set to 0 (it is by default), a default value of twice the number of generated rigid body contacts is taken.

void bl7::rigidbodies2::World::set_max_velocity_iterations ( const unsigned  iterations  ) 

Sets the number of iterations used to resolve the rigid body contacts due to closing velocity. If it is set to 0 (it is by default), a default value of twice the number of generated rigid body contacts is taken.

void bl7::rigidbodies2::World::set_motion_epsilon ( const float  motion_epsilon  ) 

Sets the lower bound of motion a rigid body can have without getting tired.

void bl7::rigidbodies2::World::set_position_epsilon ( const float  epsilon  ) 

Returns the epsilon value of minimum interpenetration depth.

void bl7::rigidbodies2::World::set_tiredness_limit ( const float  tiredness_limit  ) 

Sets the limit of tiredness to be reached before a rigid body falls asleep.

void bl7::rigidbodies2::World::set_velocity_epsilon ( const float  epsilon  ) 

Returns the epsilon value of minimum closing speed.

void bl7::rigidbodies2::World::step ( const float  time  ) 

Performs a simulation step. Therefore, this function firstly clears all force accumulators. Then, based on the new forces applied by the generators, it performs the integration resulting in updated velocity and position of the rigid bodies. Finally, it resolves possibly found contacts between objects updating the velocity -- and position due to interpenetration -- once again.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines