增加一些注释说明,部分来自AI

This commit is contained in:
2025-06-24 13:10:42 +08:00
parent fa7a0fca62
commit c3d9e26cde
2 changed files with 40 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include<hgl/type/DataType.h>
#include<hgl/type/SortedSet.h>
@@ -32,7 +32,6 @@
* RenderComponent是可渲染组件的基类所有可渲染组件都从这里派生。
*
* MeshComponent是静态网格组件它是一个具体的RenderComponent实现。
*
*/
#define COMPONENT_NAMESPACE hgl::graph
@@ -65,6 +64,14 @@ public:
using ComponentDataPtr=SharedPtr<ComponentData>;
/**
* 为什么要ComponentData与Component分离
*
* ComponentData是Component的一个数据载体但它也仅仅代表数据。
* 它不参与任何的逻辑、事件、更新、渲染操作而且同一份数据可以被多个Component使用。
* 同时Component也可以在运行时更换ComponentData。
*/
/**
* 基础组件<br>
* 是一切组件的基类