Compare commits
2 Commits
729ad1e39a
...
8c7ed92b14
Author | SHA1 | Date | |
---|---|---|---|
8c7ed92b14 | |||
69ed5eb859 |
2
CMCore
2
CMCore
Submodule CMCore updated: 7139219855...0ed44f0531
Submodule CMSceneGraph updated: c3df1ca2f8...b914dbfb66
2
CMUtil
2
CMUtil
Submodule CMUtil updated: d67a309f94...7a72b077e8
@@ -40,9 +40,9 @@ namespace hgl::graph
|
||||
SAFE_CLEAR(root_node);
|
||||
}
|
||||
|
||||
io::EventDispatcher *GetEventDispatcher() ///<获取事件分发器
|
||||
io::EventDispatcher &GetEventDispatcher() ///<获取事件分发器
|
||||
{
|
||||
return &event_dispatcher;
|
||||
return event_dispatcher;
|
||||
}
|
||||
};//class Scene
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include<hgl/type/IDName.h>
|
||||
#include<hgl/graph/SceneOrient.h>
|
||||
#include<hgl/graph/AABB.h>
|
||||
#include<hgl/graph/OBB.h>
|
||||
#include<hgl/component/Component.h>
|
||||
|
||||
namespace hgl::io
|
||||
@@ -45,7 +46,7 @@ namespace hgl::graph
|
||||
|
||||
AABB bounding_box; ///<绑定盒
|
||||
AABB local_bounding_box; ///<本地坐标绑定盒
|
||||
//AABB WorldBoundingBox; ///<世界坐标绑定盒
|
||||
OBB world_bounding_box; ///<世界坐标绑定盒
|
||||
|
||||
protected:
|
||||
|
||||
@@ -115,8 +116,9 @@ namespace hgl::graph
|
||||
{
|
||||
SetParent(nullptr); //清除父节点
|
||||
|
||||
bounding_box.SetZero();
|
||||
local_bounding_box.SetZero();
|
||||
bounding_box.Clear();
|
||||
local_bounding_box.Clear();
|
||||
world_bounding_box.Clear();
|
||||
|
||||
child_nodes.Clear();
|
||||
component_set.Clear();
|
||||
|
@@ -132,12 +132,12 @@ namespace hgl::graph
|
||||
{
|
||||
if(main_scene)
|
||||
{
|
||||
main_scene->GetEventDispatcher()->RemoveChildDispatcher(self_ep); //从旧的场景中移除事件分发器
|
||||
main_scene->GetEventDispatcher().RemoveChildDispatcher(self_ep); //从旧的场景中移除事件分发器
|
||||
}
|
||||
|
||||
if(new_scene)
|
||||
{
|
||||
new_scene->GetEventDispatcher()->AddChildDispatcher(self_ep); //添加到新的场景中
|
||||
new_scene->GetEventDispatcher().AddChildDispatcher(self_ep); //添加到新的场景中
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user