Panda3D
|
This is a set of zero or more PhysicsObjects. It's handy for returning from functions that need to return multiple PhysicsObjects. More...
Public Member Functions | |
__init__ () | |
__init__ (const PhysicsObjectCollection copy) | |
addPhysicsObject (PhysicsObject physics_object) | |
Adds a new PhysicsObject to the collection. More... | |
addPhysicsObjectsFrom (const PhysicsObjectCollection other) | |
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. More... | |
clear () | |
Removes all PhysicsObjects from the collection. More... | |
int | getNumPhysicsObjects () |
Returns the number of PhysicsObjects in the collection. More... | |
PhysicsObject | getPhysicsObject (int index) |
Returns the nth PhysicsObject in the collection. More... | |
list | getPhysicsObjects () |
bool | hasPhysicsObject (PhysicsObject physics_object) |
Returns true if the indicated PhysicsObject appears in this collection, false otherwise. More... | |
bool | isEmpty () |
Returns true if there are no PhysicsObjects in the collection, false otherwise. More... | |
PhysicsObjectCollection | operator+ (const PhysicsObjectCollection other) |
PhysicsObjectCollection | operator+= (const PhysicsObjectCollection other) |
PhysicsObjectCollection | operator= (const PhysicsObjectCollection copy) |
PhysicsObject | operator[] (int index) |
output (Ostream out) | |
Writes a brief one-line description of the PhysicsObjectCollection to the indicated output stream. More... | |
removeDuplicatePhysicsObjects () | |
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. More... | |
bool | removePhysicsObject (PhysicsObject physics_object) |
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. More... | |
removePhysicsObjectsFrom (const PhysicsObjectCollection other) | |
Removes from this collection all of the PhysicsObjects listed in the other collection. More... | |
int | size () |
Returns the number of physics objects in the collection. This is the same thing as get_num_physics_objects(). More... | |
write (Ostream out, int indent_level) | |
Writes a complete multi-line description of the PhysicsObjectCollection to the indicated output stream. More... | |
This is a set of zero or more PhysicsObjects. It's handy for returning from functions that need to return multiple PhysicsObjects.
__init__ | ( | ) |
__init__ | ( | const PhysicsObjectCollection | copy | ) |
addPhysicsObject | ( | PhysicsObject | physics_object | ) |
Adds a new PhysicsObject to the collection.
addPhysicsObjectsFrom | ( | const PhysicsObjectCollection | other | ) |
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 | ( | ) |
Removes all PhysicsObjects from the collection.
int getNumPhysicsObjects | ( | ) |
Returns the number of PhysicsObjects in the collection.
PhysicsObject getPhysicsObject | ( | int | index | ) |
Returns the nth PhysicsObject in the collection.
list getPhysicsObjects | ( | ) |
bool hasPhysicsObject | ( | PhysicsObject | physics_object | ) |
Returns true if the indicated PhysicsObject appears in this collection, false otherwise.
bool isEmpty | ( | ) |
Returns true if there are no PhysicsObjects in the collection, false otherwise.
PhysicsObjectCollection operator+ | ( | const PhysicsObjectCollection | other | ) |
PhysicsObjectCollection operator+= | ( | const PhysicsObjectCollection | other | ) |
PhysicsObjectCollection operator= | ( | const PhysicsObjectCollection | copy | ) |
PhysicsObject operator[] | ( | int | index | ) |
output | ( | Ostream | out | ) |
Writes a brief one-line description of the PhysicsObjectCollection to the indicated output stream.
removeDuplicatePhysicsObjects | ( | ) |
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.
bool removePhysicsObject | ( | PhysicsObject | physics_object | ) |
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 | ( | const PhysicsObjectCollection | other | ) |
Removes from this collection all of the PhysicsObjects listed in the other collection.
int size | ( | ) |
Returns the number of physics objects in the collection. This is the same thing as get_num_physics_objects().
write | ( | Ostream | out, |
int | indent_level | ||
) |
Writes a complete multi-line description of the PhysicsObjectCollection to the indicated output stream.