SceneTree.h
资源名称:g.rar [点击查看]
上传用户:laitongbao
上传日期:2021-02-20
资源大小:8176k
文件大小:1k
源码类别:
射击游戏
开发平台:
Visual C++
- #pragma once
- #include "NodeObject.h"
- /*
- SceneTree类,储存整个场景中的NodeObject,
- 相当于一个二叉树。
- */
- class SceneTree
- {
- friend class ShaderController;
- friend class FileController;
- public:
- SceneTree(TCHAR* name);
- ~SceneTree();
- NodeObject* AddObject(NodeObject* obj,TCHAR*parentName=NULL,bool copyObj=true);
- NodeObject* AddObject(NodeObject* obj,NodeObject*parent=NULL,bool copyObj=true);
- void AddSubtree(NodeObject* subroot,TCHAR*parentName=NULL,bool copyObj=true);
- void AddSubtree(NodeObject* subroot,NodeObject*parent=NULL,bool copyObj=true);
- void SetParent(TCHAR* name,TCHAR* parentName);
- void SetParent(NodeObject* obj,NodeObject* parent);
- void DeleteObjectWithSubobject(TCHAR* name);
- void DeleteObjectWithSubobject(NodeObject* obj);
- void DeleteObject(TCHAR* name);
- void DeleteObject(NodeObject* name);
- NodeObject* Get(TCHAR* name)const;
- NodeObject* GetRoot()const{return m_pRoot;};
- void GetInType(OBJ_TYPE type,NodeObject *tagObjList,int &objectCount)const;//没有实现
- void DeleteSubTree(NodeObject* obj); //New functoin
- void DeleteSubTree(TCHAR* name); //New functoin
- void CleanUp();
- private:
- TCHAR* m_strName; //场景名
- NodeObject* m_pRoot; //处于“场景树”最顶部的元素
- };