docs: fix README.md project structure to match actual codebase

Engine modules:
- Audio: remove AudioSource/Listener components (they belong in Components/), add IAudioEffect.h
- Components: add AudioSourceComponent.h and AudioListenerComponent.h
- Math: remove non-existent OBB.h
- Resources: fix DependencyGraph.h -> ResourceDependencyGraph.h
- Threading: add TaskSystemConfig.h
- RHI: remove incorrect RHIDescriptor.h (already covered by RHIDescriptorPool.h)

Backend fixes:
- OpenGL: add OpenGLScreenshot.h
- D3D12: fix file order (D3D12Enum.h before D3D12Types.h)
This commit is contained in:
2026-03-22 14:18:48 +08:00
parent 7028027adc
commit 1f129ed20f
33 changed files with 10 additions and 110 deletions

View File

@@ -24,18 +24,19 @@ XCEngine/
│ │ │ ├── AudioTypes.h # 音频类型定义
│ │ │ ├── AudioConfig.h # 音频配置
│ │ │ ├── AudioMixer.h # 音频混音器
│ │ │ ├── AudioSourceComponent.h # 音频源组件
│ │ │ ├── AudioListenerComponent.h # 音频监听器组件
│ │ │ ├── HRTF.h # HRTF 空间音频
│ │ │ ├── FFTFilter.h # FFT 滤波器
│ │ │ ├── Reverbation.h # 混响效果
│ │ │ ├── Equalizer.h # 均衡器
│ │ │ ├── IAudioEffect.h # 音频效果接口
│ │ │ ├── WASAPI/ # WASAPI 后端实现
│ │ │ └── IAudioBackend.h # 音频后端接口
│ │ ├── Components/ # 游戏组件系统
│ │ │ ├── Component.h # 组件基类
│ │ │ ├── GameObject.h # 游戏对象
│ │ │ ── TransformComponent.h # 变换组件
│ │ │ ── TransformComponent.h # 变换组件
│ │ │ ├── AudioSourceComponent.h # 音频源组件
│ │ │ └── AudioListenerComponent.h # 音频监听器组件
│ │ ├── Containers/ # 容器模块
│ │ │ ├── Array.h # 动态数组
│ │ │ ├── String.h # 字符串类
@@ -73,8 +74,7 @@ XCEngine/
│ │ │ ├── Ray.h # 射线
│ │ │ ├── AABB.h # 轴对齐包围盒
│ │ │ ├── Bounds.h # 包围体
│ │ │ ── OBB.h # 方向包围盒
│ │ │ ├── Frustum.h # 视锥体
│ │ │ ── Frustum.h # 视锥体
│ │ │ └── Math.h # 数学库统一头文件
│ │ ├── Memory/ # 内存管理模块
│ │ │ ├── Allocator.h # 分配器接口
@@ -91,6 +91,7 @@ XCEngine/
│ │ │ ├── LambdaTask.h # Lambda 任务
│ │ │ ├── TaskGroup.h # 任务组
│ │ │ ├── TaskSystem.h # 任务系统
│ │ │ ├── TaskSystemConfig.h # 任务系统配置
│ │ │ └── Threading.h # 线程模块统一头文件
│ │ ├── Resources/ # 资源管理模块
│ │ │ ├── ResourceTypes.h # 资源类型定义
@@ -102,7 +103,7 @@ XCEngine/
│ │ │ ├── ResourceFileSystem.h # 资源文件系统
│ │ │ ├── ResourcePath.h # 资源路径
│ │ │ ├── FileArchive.h # 文件归档
│ │ │ ├── DependencyGraph.h # 依赖图
│ │ │ ├── ResourceDependencyGraph.h # 依赖图
│ │ │ ├── ImportSettings.h # 导入设置基类
│ │ │ ├── IResourceLoader.h # 资源加载器接口
│ │ │ ├── AsyncLoader.h # 异步加载器
@@ -139,7 +140,6 @@ XCEngine/
│ │ ├── RHIPipelineState.h # 管线状态抽象
│ │ ├── RHIPipelineLayout.h # 管线布局抽象
│ │ ├── RHIDescriptorPool.h # 描述符池抽象
│ │ ├── RHIDescriptor.h # 描述符抽象
│ │ ├── OpenGL/ # OpenGL 后端实现
│ │ │ ├── OpenGLDevice.h
│ │ │ ├── OpenGLCommandQueue.h
@@ -153,7 +153,8 @@ XCEngine/
│ │ │ ├── OpenGLFence.h
│ │ │ ├── OpenGLVertexArray.h
│ │ │ ├── OpenGLRenderTargetView.h
│ │ │ ── OpenGLDepthStencilView.h
│ │ │ ── OpenGLDepthStencilView.h
│ │ │ └── OpenGLScreenshot.h
│ │ └── D3D12/ # DirectX 12 后端实现
│ │ ├── D3D12Device.h
│ │ ├── D3D12CommandQueue.h
@@ -175,8 +176,8 @@ XCEngine/
│ │ ├── D3D12ConstantBufferView.h
│ │ ├── D3D12QueryHeap.h
│ │ ├── D3D12Screenshot.h
│ │ ├── D3D12Types.h
│ │ ├── D3D12Enum.h
│ │ ├── D3D12Types.h
│ │ └── D3D12Common.h
│ ├── src/ # 实现文件
│ │ ├── Audio/

View File

@@ -1,101 +0,0 @@
# TextureImportSettings
**命名空间**: `XCEngine::Resources`
**类型**: `class`
**继承**: `ImportSettings`
**描述**: 纹理资源导入设置类,配置纹理导入时的各种参数选项。
## 概述
`TextureImportSettings` 继承自 `ImportSettings`提供了纹理资源导入时的完整配置选项。包括纹理类型、目标格式、Mipmap 生成、压缩质量、各向异性、sRGB 转换、翻转操作、法线图生成等功能。
## 公共方法
| 方法 | 描述 |
|------|------|
| [`Clone`](clone.md) | 克隆一份导入设置 |
| [`LoadFromJSON`](loadfromjson.md) | 从 JSON 加载设置 |
| [`SaveToJSON`](savetojson.md) | 保存设置到 JSON |
| [`SetTextureType`](settexturetype.md) | 设置纹理类型 |
| [`GetTextureType`](gettexturetype.md) | 获取纹理类型 |
| [`SetTargetFormat`](settargetformat.md) | 设置目标格式 |
| [`GetTargetFormat`](gettargetformat.md) | 获取目标格式 |
| [`SetGenerateMipmaps`](setgeneratemipmaps.md) | 设置是否生成 Mipmap |
| [`GetGenerateMipmaps`](getgeneratemipmaps.md) | 获取是否生成 Mipmap |
| [`SetMipmapFilter`](setmipmapfilter.md) | 设置 Mipmap 滤波器 |
| [`GetMipmapFilter`](getmipmapfilter.md) | 获取 Mipmap 滤波器 |
| [`SetMaxAnisotropy`](setmaxanisotropy.md) | 设置最大各向异性级别 |
| [`GetMaxAnisotropy`](getmaxanisotropy.md) | 获取最大各向异性级别 |
| [`SetSRGB`](setsrgb.md) | 设置是否 sRGB |
| [`GetSRGB`](getsrgb.md) | 获取 sRGB 设置 |
| [`SetFlipVertical`](setflipvertical.md) | 设置是否垂直翻转 |
| [`GetFlipVertical`](getflipvertical.md) | 获取垂直翻转设置 |
| [`SetFlipHorizontal`](setfliphhorizontal.md) | 设置是否水平翻转 |
| [`GetFlipHorizontal`](getfliphhorizontal.md) | 获取水平翻转设置 |
| [`SetBorderColor`](setbordercolor.md) | 设置边框颜色 |
| [`GetBorderColor`](getbordercolor.md) | 获取边框颜色 |
| [`SetCompressionQuality`](setcompressionquality.md) | 设置压缩质量 |
| [`GetCompressionQuality`](getcompressionquality.md) | 获取压缩质量 |
| [`SetUseHardwareCompression`](setusehardwarecompression.md) | 设置是否使用硬件压缩 |
| [`GetUseHardwareCompression`](getusehardwarecompression.md) | 获取硬件压缩设置 |
| [`SetMaxSize`](setmaxsize.md) | 设置最大纹理尺寸 |
| [`GetMaxSize`](getmaxsize.md) | 获取最大纹理尺寸 |
| [`SetGenerateNormalMap`](setgeneratenormalmap.md) | 设置是否生成法线贴图 |
| [`GetGenerateNormalMap`](getgeneratenormalmap.md) | 获取法线贴图生成设置 |
| [`SetNormalMapStrength`](setnormalmapstrength.md) | 设置法线贴图强度 |
| [`GetNormalMapStrength`](getnormalmapstrength.md) | 获取法线贴图强度 |
## 枚举类型
### MipmapFilter
Mipmap 滤波算法。
| 值 | 描述 |
|----|------|
| `Box` | Box 滤波器 |
| `Kaiser` | Kaiser 滤波器 |
### CompressionQuality
纹理压缩质量级别。
| 值 | 描述 |
|----|------|
| `Low` | 低质量压缩 |
| `Medium` | 中等质量压缩 |
| `High` | 高质量压缩 |
| `Ultra` | 超高质量压缩 |
## 使用示例
```cpp
#include <XCEngine/Resources/TextureImportSettings.h>
TextureImportSettings settings;
settings.SetTextureType(TextureType::Texture2D);
settings.SetGenerateMipmaps(true);
settings.SetMipmapFilter(MipmapFilter::Kaiser);
settings.SetSRGB(true);
settings.SetCompressionQuality(CompressionQuality::High);
settings.SetMaxAnisotropy(16);
settings.SetMaxSize(2048);
settings.SetGenerateNormalMap(true);
settings.SetNormalMapStrength(1.0f);
// 保存设置
Containers::String json = settings.SaveToJSON();
// 克隆设置
auto cloned = settings.Clone();
```
## 相关文档
- [ImportSettings](../importsettings/importsettings.md) - 导入设置基类
- [Texture](../texture/texture.md) - 纹理资源
- [ResourceManager](../resourcemanager/resourcemanager.md) - 资源管理器
- [Resources 总览](../resources.md) - 返回模块总览