feat: initial DX12 foundation framework

This commit is contained in:
SpecialX
2026-03-19 18:27:49 +08:00
commit 60f73b525d
70 changed files with 8993 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
/**
* @file Entity.h
* @brief 实体组件生命周期管理接口。
*/
#pragma once
#include "ComponentsCommon.h"
#include "Transform.h"
namespace XEngine {
/**
* @brief 前置声明组件初始化参数结构。
*/
#define INIT_INFO(component) namespace component { struct init_info; }
INIT_INFO(transform);
INIT_INFO(script);
#undef INIT_INFO
namespace game_entity {
/**
* @brief 创建实体时可选的组件初始化信息。
*/
struct entity_info
{
transform::init_info* transform{ nullptr };
script::init_info* script{ nullptr };
};
/**
* @brief 创建实体并按需附加组件。
* @param info 实体初始化信息。
* @return 新建实体句柄。
*/
entity create(entity_info info);
/**
* @brief 删除实体及其关联组件。
* @param id 实体标识符。
*/
void remove(entity_id id);
/**
* @brief 判断实体是否仍然存活。
* @param id 实体标识符。
* @return 存活返回 true否则返回 false。
*/
bool is_alive(entity_id id);
}
}