![]() |
Plasma Engine
2.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 (plWorld *pWorld) |
The plWorld in which the game objects are stored. | |
const plWorld * | GetWorld () const |
Returns the plWorld 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 (plGameObjectHandle 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 (plGameObjectHandle 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 (plGameObjectHandle hObject) |
Removes the object from the selection if it exists already, otherwise adds it. | |
plUInt32 | GetCount () const |
Returns the number of objects in the selection. | |
plGameObjectHandle | GetObject (plUInt32 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.