14#ifndef PHYSICSOBJECTCOLLECTION_H
15#define PHYSICSOBJECTCOLLECTION_H
25class EXPCL_PANDA_PHYSICS PhysicsObjectCollection {
27 PhysicsObjectCollection();
28 PhysicsObjectCollection(
const PhysicsObjectCollection ©);
29 void operator = (
const PhysicsObjectCollection ©);
30 INLINE ~PhysicsObjectCollection();
46 INLINE
void operator += (
const PhysicsObjectCollection &other);
47 INLINE PhysicsObjectCollection operator + (
const PhysicsObjectCollection &other)
const;
49 void output(std::ostream &out)
const;
50 void write(std::ostream &out,
int indent_level = 0)
const;
54 PhysicsObjects _physics_objects;
bool has_physics_object(PT(PhysicsObject) physics_object) const
Returns true if the indicated PhysicsObject appears in this collection, false otherwise.
void clear()
Removes all PhysicsObjects from the collection.
bool is_empty() const
Returns true if there are no PhysicsObjects in the collection, false otherwise.
void add_physics_object(PT(PhysicsObject) physics_object)
Adds a new PhysicsObject to the collection.
bool remove_physics_object(PT(PhysicsObject) physics_object)
Removes the indicated PhysicsObject from the collection.
get_num_physics_objects
Returns the number of PhysicsObjects in the collection.
void remove_physics_objects_from(const PhysicsObjectCollection &other)
Removes from this collection all of the PhysicsObjects listed in the other collection.
void remove_duplicate_physics_objects()
Removes any duplicate entries of the same PhysicsObjects on this collection.
void add_physics_objects_from(const PhysicsObjectCollection &other)
Adds all the PhysicsObjects indicated in the other collection to this collection.
A body on which physics will be applied.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.