1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
5 #include <CryString/CryString.h>
9 enum class ESceneElementType
: int;
13 class CSceneElementCommon
16 CSceneElementCommon(CScene
* pScene
, int id
);
17 virtual ~CSceneElementCommon() {}
20 CSceneElementCommon
* GetParent() const;
21 CSceneElementCommon
* GetChild(int index
) const;
22 int GetNumChildren() const;
24 string
GetName() const;
25 int GetSiblingIndex() const;
28 void SetName(const string
& name
);
29 void SetName(const char* szName
);
30 void SetSiblingIndex(int index
);
32 void AddChild(CSceneElementCommon
* pChild
);
33 CSceneElementCommon
* RemoveChild(int index
);
35 virtual ESceneElementType
GetType() const = 0;
37 static void MakeRoot(CSceneElementCommon
* pSceneElement
); // Remove element from its parent.
41 std::vector
<CSceneElementCommon
*> m_children
;
42 CSceneElementCommon
* m_pParent
;