#include <ObjectContainer.h>
Public Member Functions | |
| ObjectContainer (World *world) | |
| virtual | ~ObjectContainer (void) |
| World * | get_world () const |
| size_t | get_object_count () const |
| size_t | get_awake_count () const |
| size_t | get_asleep_count () const |
| void | add_object (Object_T *object) |
| void | remove_object (Object_T *object) |
| Object_T * | get_object (size_t index) const |
| virtual void | send_message (int msg, const void *data=NULL) |
| virtual void | update_state (const void *data=NULL) |
| void | refresh_state () |
| cyber::world::ObjectContainer< Object_T >::ObjectContainer | ( | World * | world | ) | [inline] |
Explicit constructor.
| virtual cyber::world::ObjectContainer< Object_T >::~ObjectContainer | ( | void | ) | [inline, virtual] |
Destructor.
| void cyber::world::ObjectContainer< Object_T >::add_object | ( | Object_T * | object | ) | [inline] |
Adds the given object to this container.
| size_t cyber::world::ObjectContainer< Object_T >::get_asleep_count | ( | ) | const [inline] |
Returns the number of sleeping objects.
| size_t cyber::world::ObjectContainer< Object_T >::get_awake_count | ( | ) | const [inline] |
Returns the number of awake objects.
| Object_T* cyber::world::ObjectContainer< Object_T >::get_object | ( | size_t | index | ) | const [inline] |
Returns the object identified by the given index.
| size_t cyber::world::ObjectContainer< Object_T >::get_object_count | ( | ) | const [inline] |
Returns the number of all objects.
| World* cyber::world::ObjectContainer< Object_T >::get_world | ( | ) | const [inline] |
Returns the world object.
| void cyber::world::ObjectContainer< Object_T >::refresh_state | ( | ) | [inline] |
Refreshes the ranges of the awake and sleeping entities within this container according to the particular state of each entity (once per frame).
| void cyber::world::ObjectContainer< Object_T >::remove_object | ( | Object_T * | object | ) | [inline] |
Removes the given object from this container.
| virtual void cyber::world::ObjectContainer< Object_T >::send_message | ( | int | msg, | |
| const void * | data = NULL | |||
| ) | [inline, virtual] |
Sends a message to all (awake) entities.
| virtual void cyber::world::ObjectContainer< Object_T >::update_state | ( | const void * | data = NULL |
) | [inline, virtual] |
Updates the state of all entities (once per frame).
1.7.1