准备定义PrimitiveComponent用于取代原本SceneNode中的Renderable数据
This commit is contained in:
parent
ab3f771455
commit
f0512edb5a
@ -4,8 +4,12 @@
|
||||
#include<hgl/type/SortedSet.h>
|
||||
#include<hgl/type/List.h>
|
||||
|
||||
namespace hgl::graph
|
||||
{
|
||||
#define COMPONENT_NAMESPACE hgl::graph
|
||||
#define COMPONENT_NAMESPACE_BEGIN namespace COMPONENT_NAMESPACE {
|
||||
#define COMPONENT_NAMESPACE_END }
|
||||
|
||||
COMPONENT_NAMESPACE_BEGIN
|
||||
|
||||
class ComponentManager;
|
||||
class SceneNode;
|
||||
|
||||
@ -81,4 +85,5 @@ namespace hgl::graph
|
||||
virtual void OnFocusLost(){} ///<焦点丢失事件
|
||||
virtual void OnFocusGained(){} ///<焦点获得事件
|
||||
};//class ComponentManager
|
||||
}//namespace hgl::graph
|
||||
|
||||
COMPONENT_NAMESPACE_END
|
||||
|
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include<hgl/component/RenderComponent.h>
|
||||
#include<hgl/graph/VKRenderable.h>
|
||||
|
||||
COMPONENT_NAMESPACE_BEGIN
|
||||
|
||||
class PrimitiveComponent:public RenderComponent
|
||||
{
|
||||
public:
|
||||
|
||||
PrimitiveComponent()=default;
|
||||
virtual ~PrimitiveComponent()=default;
|
||||
|
||||
Renderable *GetRenderable();
|
||||
};//class PrimitiveComponent
|
||||
|
||||
COMPONENT_NAMESPACE_END
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include<hgl/component/Component.h>
|
||||
|
||||
namespace hgl::graph
|
||||
{
|
||||
COMPONENT_NAMESPACE_BEGIN
|
||||
|
||||
/**
|
||||
* 可渲染组件
|
||||
*/
|
||||
@ -13,7 +13,6 @@ namespace hgl::graph
|
||||
|
||||
RenderComponent()=default;
|
||||
virtual ~RenderComponent()=default;
|
||||
|
||||
virtual void Render()=0;
|
||||
};//class RenderComponent
|
||||
}//namespace hgl::graph
|
||||
|
||||
COMPONENT_NAMESPACE_END
|
||||
|
@ -63,6 +63,7 @@ public:
|
||||
|
||||
/**
|
||||
* 原始可渲染对象(即仅一个模型一个材质)
|
||||
* 未来考虑改名StaticMesh哦!
|
||||
*/
|
||||
class Renderable ///可渲染对象实例
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user