XII Release 0.1.0
Loading...
Searching...
No Matches
xiiObjectSelection Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <ObjectSelection.h>

Public Member Functions

 xiiObjectSelection ()
 Copyright (c) Theophilus Eriata. All Rights Reserved.
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)
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.

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

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

Member Function Documentation

◆ RemoveObject()

bool xiiObjectSelection::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.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Utilities/DataStructures/ObjectSelection.h
  • /home/runner/work/XII/XII/Source/Engine/Utilities/DataStructures/Implementation/ObjectSelection.cpp