Plasma Engine  2.0
Loading...
Searching...
No Matches
ObjectSelection.h
1#pragma once
2
3#include <Core/World/GameObject.h>
4#include <Core/World/World.h>
5#include <Foundation/Containers/Deque.h>
6#include <Utilities/UtilitiesDLL.h>
7
9class PL_UTILITIES_DLL plObjectSelection
10{
11public:
13
15 void SetWorld(plWorld* pWorld);
16
18 const plWorld* GetWorld() const { return m_pWorld; }
19
21 void Clear() { m_Objects.Clear(); }
22
24 void RemoveDeadObjects();
25
27 void AddObject(plGameObjectHandle hObject, bool bDontAddTwice = true);
28
31 bool RemoveObject(plGameObjectHandle hObject);
32
34 void ToggleSelection(plGameObjectHandle hObject);
35
37 plUInt32 GetCount() const { return m_Objects.GetCount(); }
38
40 plGameObjectHandle GetObject(plUInt32 uiIndex) const { return m_Objects[uiIndex]; }
41
42private:
43 plWorld* m_pWorld;
45};
Definition Deque.h:270
Stores a list of game objects as a 'selection'. Provides some common convenience functions for workin...
Definition ObjectSelection.h:10
plUInt32 GetCount() const
Returns the number of objects in the selection.
Definition ObjectSelection.h:37
const plWorld * GetWorld() const
Returns the plWorld in which the game objects live.
Definition ObjectSelection.h:18
plGameObjectHandle GetObject(plUInt32 uiIndex) const
Returns the n-th object in the selection.
Definition ObjectSelection.h:40
void Clear()
Clears the selection.
Definition ObjectSelection.h:21
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
A handle to a game object.
Definition Declarations.h:76