ezEngine  Milestone 7
ezObjectSelection Class Reference

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 (ezWorld *pWorld)
 The ezWorld in which the game objects are stored.
 
const ezWorldGetWorld () const
 Returns the ezWorld 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 (ezGameObjectHandle 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 (ezGameObjectHandle 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 (ezGameObjectHandle hObject)
 Removes the object from the selection if it exists already, otherwise adds it.
 
ezUInt32 GetCount () const
 Returns the number of objects in the selection.
 
ezGameObjectHandle GetObject (ezUInt32 index) const
 Returns the n-th object in the selection.
 

Private Attributes

ezWorldm_pWorld
 
ezDeque< ezGameObjectHandlem_Objects
 

Detailed Description

Stores a list of game objects as a 'selection'. Provides some common convenience functions for working with selections.


The documentation for this class was generated from the following files: