![]() |
XII Release 0.1.0
|
Stores a list of game objects as a 'selection'. Provides some common convenience functions for working with selections. More...
#include <ObjectSelection.h>
Public Member Functions | |
void | SetWorld (xiiWorld *pWorld) |
The xiiWorld in which the game objects are stored. | |
const xiiWorld * | GetWorld () const |
Returns the xiiWorld in which the game objects live. | |
void | Clear () |
Clears the selection. | |
void | RemoveDeadObjects () |
Iterates over all objects and removes the ones that have been destroyed from the selection. | |
void | AddObject (xiiGameObjectHandle hObject, bool bDontAddTwice=true) |
Adds the given object to the selection, unless it is not valid anymore. Objects can be added multiple times. | |
bool | RemoveObject (xiiGameObjectHandle hObject) |
Removes the first occurrence of the given object from the selection. Returns false if the object did not exist in the selection. | |
void | ToggleSelection (xiiGameObjectHandle hObject) |
Removes the object from the selection if it exists already, otherwise adds it. | |
xiiUInt32 | GetCount () const |
Returns the number of objects in the selection. | |
xiiGameObjectHandle | GetObject (xiiUInt32 uiIndex) const |
Returns the n-th object in the selection. | |
Stores a list of game objects as a 'selection'. Provides some common convenience functions for working with selections.