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:
11
docs/api/math/color/black.md
Normal file
11
docs/api/math/color/black.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Black
|
||||
|
||||
```cpp
|
||||
static Color Black()
|
||||
```
|
||||
|
||||
返回黑色 (0, 0, 0, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Black();`
|
||||
11
docs/api/math/color/blue.md
Normal file
11
docs/api/math/color/blue.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Blue
|
||||
|
||||
```cpp
|
||||
static Color Blue()
|
||||
```
|
||||
|
||||
返回蓝色 (0, 0, 1, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Blue();`
|
||||
11
docs/api/math/color/clear.md
Normal file
11
docs/api/math/color/clear.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Clear
|
||||
|
||||
```cpp
|
||||
static Color Clear()
|
||||
```
|
||||
|
||||
返回透明黑色 (0, 0, 0, 0)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Clear();`
|
||||
64
docs/api/math/color/color.md
Normal file
64
docs/api/math/color/color.md
Normal 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 模块总览
|
||||
11
docs/api/math/color/cyan.md
Normal file
11
docs/api/math/color/cyan.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Cyan
|
||||
|
||||
```cpp
|
||||
static Color Cyan()
|
||||
```
|
||||
|
||||
返回青色 (0, 1, 1, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Cyan();`
|
||||
11
docs/api/math/color/green.md
Normal file
11
docs/api/math/color/green.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Green
|
||||
|
||||
```cpp
|
||||
static Color Green()
|
||||
```
|
||||
|
||||
返回绿色 (0, 1, 0, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Green();`
|
||||
22
docs/api/math/color/lerp.md
Normal file
22
docs/api/math/color/lerp.md
Normal 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);
|
||||
```
|
||||
11
docs/api/math/color/magenta.md
Normal file
11
docs/api/math/color/magenta.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Magenta
|
||||
|
||||
```cpp
|
||||
static Color Magenta()
|
||||
```
|
||||
|
||||
返回品红色 (1, 0, 1, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Magenta();`
|
||||
11
docs/api/math/color/red.md
Normal file
11
docs/api/math/color/red.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Red
|
||||
|
||||
```cpp
|
||||
static Color Red()
|
||||
```
|
||||
|
||||
返回红色 (1, 0, 0, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Red();`
|
||||
18
docs/api/math/color/torgba.md
Normal file
18
docs/api/math/color/torgba.md
Normal 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();
|
||||
```
|
||||
17
docs/api/math/color/tovector3.md
Normal file
17
docs/api/math/color/tovector3.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Color::ToVector3
|
||||
|
||||
```cpp
|
||||
Vector3 ToVector3() const
|
||||
```
|
||||
|
||||
将颜色转换为 Vector3(丢弃 alpha)。
|
||||
|
||||
**返回:** `Vector3` - RGB 值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
Vector3 rgb = Color::Red().ToVector3();
|
||||
```
|
||||
17
docs/api/math/color/tovector4.md
Normal file
17
docs/api/math/color/tovector4.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Color::ToVector4
|
||||
|
||||
```cpp
|
||||
Vector4 ToVector4() const
|
||||
```
|
||||
|
||||
将颜色转换为 Vector4。
|
||||
|
||||
**返回:** `Vector4` - RGBA 值
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
Vector4 rgba = Color::Red().ToVector4();
|
||||
```
|
||||
11
docs/api/math/color/white.md
Normal file
11
docs/api/math/color/white.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::White
|
||||
|
||||
```cpp
|
||||
static Color White()
|
||||
```
|
||||
|
||||
返回白色 (1, 1, 1, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::White();`
|
||||
11
docs/api/math/color/yellow.md
Normal file
11
docs/api/math/color/yellow.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Color::Yellow
|
||||
|
||||
```cpp
|
||||
static Color Yellow()
|
||||
```
|
||||
|
||||
返回黄色 (1, 1, 0, 1)。
|
||||
|
||||
**返回:** `Color`
|
||||
|
||||
**示例:** `Color c = Color::Yellow();`
|
||||
Reference in New Issue
Block a user