Panda3D
physxObjectCollection.h
1 // Filename: physxObjectCollection.h
2 // Created by: enn0x (08Nov09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXOBJECTCOLLECTION_H
16 #define PHYSXOBJECTCOLLECTION_H
17 
18 #include "pandabase.h"
19 
20 #include "config_physx.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PhysxObjectCollection
24 // Description :
25 ////////////////////////////////////////////////////////////////////
26 template <class T>
27 class EXPCL_PANDAPHYSX PhysxObjectCollection {
28 
29 public:
30  INLINE unsigned int size() const;
31  INLINE void add(PT(T) object);
32  INLINE void remove(PT(T) object);
33  INLINE T *get(unsigned int index) const;
34  INLINE T *operator [] (unsigned int index) const;
35 
36  INLINE void ls() const;
37  INLINE void ls(ostream &out, int indent_level=0) const;
38 
39 private:
40  pvector<PT(T)> _objects;
41 };
42 
43 #include "physxObjectCollection.I"
44 
45 #endif // PHYSXOBJECTCOLLECTION_H