Panda3D
|
00001 // Filename: physxObjectCollection.h 00002 // Created by: enn0x (08Nov09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXOBJECTCOLLECTION_H 00016 #define PHYSXOBJECTCOLLECTION_H 00017 00018 #include "pandabase.h" 00019 00020 #include "config_physx.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : PhysxObjectCollection 00024 // Description : 00025 //////////////////////////////////////////////////////////////////// 00026 template <class T> 00027 class EXPCL_PANDAPHYSX PhysxObjectCollection { 00028 00029 public: 00030 INLINE unsigned int size() const; 00031 INLINE void add(PT(T) object); 00032 INLINE void remove(PT(T) object); 00033 INLINE T *get(unsigned int index) const; 00034 INLINE T *operator [] (unsigned int index) const; 00035 00036 INLINE void ls() const; 00037 INLINE void ls(ostream &out, int indent_level=0) const; 00038 00039 private: 00040 pvector<PT(T)> _objects; 00041 }; 00042 00043 #include "physxObjectCollection.I" 00044 00045 #endif // PHYSXOBJECTCOLLECTION_H