PhysicsObjectCollection

Inheritance:

Methods of PhysicsObjectCollection:

PhysicsObjectCollection
PhysicsObjectCollection::PhysicsObjectCollection(void);

Description:

addPhysicsObject
void PhysicsObjectCollection::add_physics_object(PointerTo< PhysicsObject > physics_object);

Description: Adds a new PhysicsObject to the collection.

addPhysicsObjectsFrom
void PhysicsObjectCollection::add_physics_objects_from(PhysicsObjectCollection const &other);

Description: Adds all the PhysicsObjects indicated in the other collection to this collection. The other physics_objects are simply appended to the end of the physics_objects in this list; duplicates are not automatically removed.

clear
void PhysicsObjectCollection::clear(void);

Description: Removes all PhysicsObjects from the collection.

getNumPhysicsObjects
int PhysicsObjectCollection::get_num_physics_objects(void) const;

Description: Returns the number of PhysicsObjects in the collection.

getPhysicsObject
PointerTo< PhysicsObject > PhysicsObjectCollection::get_physics_object(int index) const;

Description: Returns the nth PhysicsObject in the collection.

hasPhysicsObject
bool PhysicsObjectCollection::has_physics_object(PointerTo< PhysicsObject > physics_object) const;

Description: Returns true if the indicated PhysicsObject appears in this collection, false otherwise.

isEmpty
bool PhysicsObjectCollection::is_empty(void) const;

Description: Returns true if there are no PhysicsObjects in the collection, false otherwise.

operator =
void PhysicsObjectCollection::operator =(PhysicsObjectCollection const &copy);

Description:

operator []
PointerTo< PhysicsObject > PhysicsObjectCollection::operator [](int index) const;

Description: Returns the nth PhysicsObject in the collection. This is the same as get_physics_object(), but it may be a more convenient way to access it.

output
void PhysicsObjectCollection::output(ostream &out) const;

Description: Writes a brief one-line description of the PhysicsObjectCollection to the indicated output stream.

removeDuplicatePhysicsObjects
void PhysicsObjectCollection::remove_duplicate_physics_objects(void);

Description: Removes any duplicate entries of the same PhysicsObjects on this collection. If a PhysicsObject appears multiple times, the first appearance is retained; subsequent appearances are removed.

removePhysicsObject
bool PhysicsObjectCollection::remove_physics_object(PointerTo< PhysicsObject > physics_object);

Description: Removes the indicated PhysicsObject from the collection. Returns true if the physics_object was removed, false if it was not a member of the collection.

removePhysicsObjectsFrom
void PhysicsObjectCollection::remove_physics_objects_from(PhysicsObjectCollection const &other);

Description: Removes from this collection all of the PhysicsObjects listed in the other collection.

write
void PhysicsObjectCollection::write(ostream &out, int indent_level = (0)) const;

Description: Writes a complete multi-line description of the PhysicsObjectCollection to the indicated output stream.