SceneNode增加GetEventDispatcher接口
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include<hgl/graph/mtl/MaterialLibrary.h>
|
||||
#include<hgl/graph/Renderer.h>
|
||||
#include<hgl/graph/Scene.h>
|
||||
#include<hgl/io/event/WindowEvent.h>
|
||||
#include<hgl/Time.h>
|
||||
//#include<iostream>
|
||||
|
||||
@@ -22,7 +21,7 @@ namespace hgl
|
||||
*
|
||||
* WorkObject被定义为工作对象,所有的渲染控制都需要被写在WorkObject的Render函数下。
|
||||
*/
|
||||
class WorkObject:public TickObject,public io::WindowEvent
|
||||
class WorkObject:public TickObject
|
||||
{
|
||||
graph::RenderFramework *render_framework=nullptr;
|
||||
|
||||
|
@@ -6,6 +6,11 @@
|
||||
#include<hgl/graph/AABB.h>
|
||||
#include<hgl/component/Component.h>
|
||||
|
||||
namespace hgl::io
|
||||
{
|
||||
class EventDispatcher; // 前向声明事件分发器
|
||||
}//
|
||||
|
||||
namespace hgl::graph
|
||||
{
|
||||
using SceneNodeID =int64;
|
||||
@@ -54,7 +59,7 @@ namespace hgl::graph
|
||||
SceneNode(const SceneNode &)=delete;
|
||||
SceneNode(const SceneNode *)=delete;
|
||||
|
||||
using SceneOrient::SceneOrient; ///<继承构造函数
|
||||
using SceneOrient::SceneOrient; ///<继承构造函数
|
||||
virtual ~SceneNode();
|
||||
|
||||
public:
|
||||
@@ -122,6 +127,10 @@ namespace hgl::graph
|
||||
return sn;
|
||||
}
|
||||
|
||||
public: //事件相关
|
||||
|
||||
virtual io::EventDispatcher *GetEventDispatcher(){return nullptr;} ///<取得事件分发器(如果返回nullptr,则表示该节点不支持事件分发)
|
||||
|
||||
public: //坐标相关方法
|
||||
|
||||
virtual void SetBoundingBox (const AABB &bb){bounding_box=bb;} ///<设置绑定盒
|
||||
|
Reference in New Issue
Block a user