!XT (BREAK-16) (Sandbox) Remove double-newlines at the end of files.
[CRYENGINE.git] / Code / Sandbox / Plugins / MeshImporter / Scene / SceneElementCommon.h
blobb4f1be3662f203141ad01af816cacc751addbcca
1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
3 #pragma once
5 #include <CryString/CryString.h>
7 #include <vector>
9 enum class ESceneElementType : int;
11 class CScene;
13 class CSceneElementCommon
15 public:
16 CSceneElementCommon(CScene* pScene, int id);
17 virtual ~CSceneElementCommon() {}
19 int GetId() const;
20 CSceneElementCommon* GetParent() const;
21 CSceneElementCommon* GetChild(int index) const;
22 int GetNumChildren() const;
23 bool IsLeaf() const;
24 string GetName() const;
25 int GetSiblingIndex() const;
26 CScene* GetScene();
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.
38 private:
39 string m_name;
41 std::vector<CSceneElementCommon*> m_children;
42 CSceneElementCommon* m_pParent;
43 int m_siblingIndex;
45 CScene* m_pScene;
46 int m_id;