独立CreateComponentInfo.h
This commit is contained in:
50
inc/hgl/component/CreateComponentInfo.h
Normal file
50
inc/hgl/component/CreateComponentInfo.h
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include<hgl/math/Matrix.h>
|
||||||
|
|
||||||
|
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
|
@@ -11,6 +11,7 @@
|
|||||||
#include<hgl/graph/VKRenderResource.h>
|
#include<hgl/graph/VKRenderResource.h>
|
||||||
#include<hgl/graph/mtl/MaterialLibrary.h>
|
#include<hgl/graph/mtl/MaterialLibrary.h>
|
||||||
#include<hgl/io/event/MouseEvent.h>
|
#include<hgl/io/event/MouseEvent.h>
|
||||||
|
#include<hgl/component/CreateComponentInfo.h>
|
||||||
|
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
|
|
||||||
@@ -28,44 +29,6 @@ class Renderer;
|
|||||||
class CameraComponentManager{/*现阶段测试使用*/};
|
class CameraComponentManager{/*现阶段测试使用*/};
|
||||||
class LightComponentManager{/*现阶段测试使用*/};
|
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
|
class RenderFramework:public io::WindowEvent
|
||||||
{
|
{
|
||||||
OSString app_name;
|
OSString app_name;
|
||||||
|
Reference in New Issue
Block a user