21 return _objects.size();
31 _objects.push_back(
object);
41 typename pvector<PT(T)>::iterator it;
43 it = find(_objects.begin(), _objects.end(), object);
44 if (it != _objects.end()) {
49 physx_cat.warning() <<
"object not found in collection" << std::endl;
59 get(
unsigned int index)
const {
61 nassertr(index < _objects.size(),
nullptr);
62 return _objects[index];
73 nassertr(index < _objects.size(),
nullptr);
74 return _objects[index];
92 ls(std::ostream &out,
int indent_level)
const {
94 for (
unsigned int i=0; i < size(); i++) {
95 get(i)->ls(out, indent_level + 2);
T * operator [](unsigned int index) const
Returns the n-th PhysxObject in the collection.
T * get(unsigned int index) const
Returns the n-th PhysxObject in the collection.
This is our own Panda specialization on the default STL vector.