fix: improve doc link navigation and tree display

- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
This commit is contained in:
2026-03-19 12:44:08 +08:00
parent e003fe6513
commit 58a83f445a
1012 changed files with 56880 additions and 22 deletions

View File

@@ -0,0 +1,11 @@
# Color::Black
```cpp
static Color Black()
```
返回黑色 (0, 0, 0, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Black();`

View File

@@ -0,0 +1,11 @@
# Color::Blue
```cpp
static Color Blue()
```
返回蓝色 (0, 0, 1, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Blue();`

View File

@@ -0,0 +1,11 @@
# Color::Clear
```cpp
static Color Clear()
```
返回透明黑色 (0, 0, 0, 0)。
**返回:** `Color`
**示例:** `Color c = Color::Clear();`

View File

@@ -0,0 +1,64 @@
# Color
颜色结构体,支持 RGBA 浮点分量。
**头文件:** `#include <XCEngine/Math/Color.h>`
**命名空间:** `XCEngine::Math`
## 结构体定义
```cpp
struct Color {
float r = 1.0f;
float g = 1.0f;
float b = 1.0f;
float a = 1.0f;
};
```
## 构造函数
- `Color()` - 默认构造,初始化为白色 (1, 1, 1, 1)
- `constexpr Color(float r, float g, float b, float a = 1.0f)` - 从 RGBA 分量构造
## 静态工厂方法
| 方法 | 返回值 | 描述 |
|------|--------|------|
| [White()](white.md) | `Color` | (1, 1, 1, 1) |
| [Black()](black.md) | `Color` | (0, 0, 0, 1) |
| [Red()](red.md) | `Color` | (1, 0, 0, 1) |
| [Green()](green.md) | `Color` | (0, 1, 0, 1) |
| [Blue()](blue.md) | `Color` | (0, 0, 1, 1) |
| [Yellow()](yellow.md) | `Color` | (1, 1, 0, 1) |
| [Cyan()](cyan.md) | `Color` | (0, 1, 1, 1) |
| [Magenta()](magenta.md) | `Color` | (1, 0, 1, 1) |
| [Clear()](clear.md) | `Color` | (0, 0, 0, 0),透明黑 |
## 静态方法
| 方法 | 返回值 | 描述 |
|------|--------|------|
| [Lerp(a, b, t)](lerp.md) | `Color` | 颜色线性插值 |
## 实例方法
| 方法 | 返回值 | 描述 |
|------|--------|------|
| [ToRGBA()](torgba.md) | `uint32_t` | 转换为 32-bit RGBA (0xRRGGBBAA) |
| [ToVector3()](tovector3.md) | `Vector3` | 转换为 RGB (丢弃 alpha) |
| [ToVector4()](tovector4.md) | `Vector4` | 转换为 RGBA |
## 运算符
| 运算符 | 描述 |
|--------|------|
| `operator+(Color, Color)` | 颜色相加 |
| `operator-(Color, Color)` | 颜色相减 |
| `operator*(Color, float)` | 颜色乘以标量 |
| `operator/(Color, float)` | 颜色除以标量 |
## 相关文档
- [Math 模块总览](../math.md) - 返回 Math 模块总览

View File

@@ -0,0 +1,11 @@
# Color::Cyan
```cpp
static Color Cyan()
```
返回青色 (0, 1, 1, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Cyan();`

View File

@@ -0,0 +1,11 @@
# Color::Green
```cpp
static Color Green()
```
返回绿色 (0, 1, 0, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Green();`

View File

@@ -0,0 +1,22 @@
# Color::Lerp
```cpp
static Color Lerp(const Color& a, const Color& b, float t)
```
在两个颜色之间进行线性插值。
**参数:**
- `a` - 起始颜色
- `b` - 结束颜色
- `t` - 插值因子 (0-1)
**返回:** `Color` - 插值结果
**复杂度:** O(1)
**示例:**
```cpp
Color lerped = Color::Lerp(Color::Red(), Color::Blue(), 0.5f);
```

View File

@@ -0,0 +1,11 @@
# Color::Magenta
```cpp
static Color Magenta()
```
返回品红色 (1, 0, 1, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Magenta();`

View File

@@ -0,0 +1,11 @@
# Color::Red
```cpp
static Color Red()
```
返回红色 (1, 0, 0, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Red();`

View File

@@ -0,0 +1,18 @@
# Color::ToRGBA
```cpp
uint32_t ToRGBA() const
```
将颜色转换为 32-bit RGBA 整数格式。
**返回:** `uint32_t` - RGBA 值 (0xRRGGBBAA)
**复杂度:** O(1)
**示例:**
```cpp
Color c(1.0f, 0.0f, 0.0f, 1.0f);
uint32_t rgba = c.ToRGBA();
```

View File

@@ -0,0 +1,17 @@
# Color::ToVector3
```cpp
Vector3 ToVector3() const
```
将颜色转换为 Vector3丢弃 alpha
**返回:** `Vector3` - RGB 值
**复杂度:** O(1)
**示例:**
```cpp
Vector3 rgb = Color::Red().ToVector3();
```

View File

@@ -0,0 +1,17 @@
# Color::ToVector4
```cpp
Vector4 ToVector4() const
```
将颜色转换为 Vector4。
**返回:** `Vector4` - RGBA 值
**复杂度:** O(1)
**示例:**
```cpp
Vector4 rgba = Color::Red().ToVector4();
```

View File

@@ -0,0 +1,11 @@
# Color::White
```cpp
static Color White()
```
返回白色 (1, 1, 1, 1)。
**返回:** `Color`
**示例:** `Color c = Color::White();`

View File

@@ -0,0 +1,11 @@
# Color::Yellow
```cpp
static Color Yellow()
```
返回黄色 (1, 1, 0, 1)。
**返回:** `Color`
**示例:** `Color c = Color::Yellow();`