From 124fd9701f25cb18eb81a02cda7fc59898589066 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Tue, 15 Jul 2025 22:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8B=AC=E7=AB=8BCreateComponentInfo.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/component/CreateComponentInfo.h | 50 +++++++++++++++++++++++++ inc/hgl/graph/RenderFramework.h | 39 +------------------ 2 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 inc/hgl/component/CreateComponentInfo.h diff --git a/inc/hgl/component/CreateComponentInfo.h b/inc/hgl/component/CreateComponentInfo.h new file mode 100644 index 00000000..d6d91e7d --- /dev/null +++ b/inc/hgl/component/CreateComponentInfo.h @@ -0,0 +1,50 @@ +#pragma once + +#include + +namespace hgl +{ + namespace graph + { + class SceneNode; + + struct CreateComponentInfo + { + graph::SceneNode *parent_node; ///<父节点 + graph::Matrix4f mat; ///<矩阵 + + public: + + CreateComponentInfo() + { + parent_node=nullptr; + mat=graph::Identity4f; + } + + CreateComponentInfo(const CreateComponentInfo &cci) + { + parent_node=cci.parent_node; + mat=cci.mat; + } + + CreateComponentInfo(graph::SceneNode *pn,const graph::Matrix4f &m) + { + parent_node=pn; + mat=m; + } + + CreateComponentInfo(graph::SceneNode *pn) + { + parent_node=pn; + mat=graph::Identity4f; + } + + CreateComponentInfo(const graph::Matrix4f &m) + { + parent_node=nullptr; + mat=m; + } + };//struct CreateComponentInfo + + }//namespace graph +}//namespace hgl diff --git a/inc/hgl/graph/RenderFramework.h b/inc/hgl/graph/RenderFramework.h index 9d3c5203..9c059250 100644 --- a/inc/hgl/graph/RenderFramework.h +++ b/inc/hgl/graph/RenderFramework.h @@ -11,6 +11,7 @@ #include #include #include +#include VK_NAMESPACE_BEGIN @@ -28,44 +29,6 @@ class Renderer; class CameraComponentManager{/*现阶段测试使用*/}; class LightComponentManager{/*现阶段测试使用*/}; -struct CreateComponentInfo -{ - graph::SceneNode *parent_node; ///<父节点 - graph::Matrix4f mat; ///<矩阵 - -public: - - CreateComponentInfo() - { - parent_node=nullptr; - mat=graph::Identity4f; - } - - CreateComponentInfo(const CreateComponentInfo &cci) - { - parent_node=cci.parent_node; - mat=cci.mat; - } - - CreateComponentInfo(graph::SceneNode *pn,const graph::Matrix4f &m) - { - parent_node=pn; - mat=m; - } - - CreateComponentInfo(graph::SceneNode *pn) - { - parent_node=pn; - mat=graph::Identity4f; - } - - CreateComponentInfo(const graph::Matrix4f &m) - { - parent_node=nullptr; - mat=m; - } -};//struct CreateComponentInfo - class RenderFramework:public io::WindowEvent { OSString app_name;