Changeset 7368 in orxonox.OLD for trunk/src/util/object_manager.h
- Timestamp:
- Apr 25, 2006, 11:37:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/object_manager.h
r7221 r7368 67 67 68 68 //! A powerfull handler for the Object (WorldEntities) in the World. 69 class ObjectManager : public BaseObject { 69 class ObjectManager : public BaseObject 70 { 71 public: 72 typedef std::list<WorldEntity*> EntityList; //!< A type definition to make it easy to use EntityLists. 70 73 71 public: 72 ObjectManager(); 73 virtual ~ObjectManager(); 74 ObjectManager(); 75 virtual ~ObjectManager(); 74 76 75 77 void flush(); … … 79 81 80 82 81 std::list<WorldEntity*>& getObjectList(OM_LIST listNumber) { return this->objectLists[listNumber]; } 82 const std::list<WorldEntity*>& getObjectList(OM_LIST listNumber) const { return this->objectLists[listNumber]; } 83 /** @returns the List (listnumber) of objects. @param listNumber the List to get. */ 84 EntityList& getObjectList(OM_LIST listNumber) { return this->objectLists[listNumber]; } 85 /** @returns a constant LIST of Objects. @param listNumber the objectList to returns */ 86 const EntityList& getObjectList(OM_LIST listNumber) const { return this->objectLists[listNumber]; } 83 87 84 static std::list<WorldEntity*>* distanceFromObject(const PNode& center, float radius, ClassID classID);88 static void distanceFromObject(EntityList& entities, const PNode& center, float radius, ClassID classID); 85 89 86 90 void debug(OM_LIST omList, unsigned int level = 0) const; … … 90 94 static const char* OMListToString(OM_LIST omList); 91 95 92 93 const std::list<BaseObject>* pNodeList; 96 private: 97 const std::list<BaseObject>* pNodeList; //!< The List of PNodes. 94 98 95 96 std::list<WorldEntity*> objectLists[OM_SIZE]; 99 EntityList objectLists[OM_SIZE]; //!< The ObjectLists. 97 100 98 101 static const char* objectManagerListNames[]; //!< Names of all the lists
Note: See TracChangeset
for help on using the changeset viewer.