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,17 @@
# Transform::Inverse
```cpp
Transform Inverse() const
```
返回变换的逆。
**返回:** `Transform` - 逆变换
**复杂度:** O(1)
**示例:**
```cpp
Transform inv = transform.Inverse();
```

View File

@@ -0,0 +1,21 @@
# Transform::InverseTransformDirection
```cpp
Vector3 InverseTransformDirection(const Vector3& direction) const
```
对方向进行逆变换(包含缩放处理)。
**参数:**
- `direction` - 世界空间中的方向
**返回:** `Vector3` - 局部空间中的方向
**复杂度:** O(1)
**示例:**
```cpp
Transform t;
Vector3 localDir = t.InverseTransformDirection(worldDir);
```

View File

@@ -0,0 +1,21 @@
# Transform::InverseTransformPoint
```cpp
Vector3 InverseTransformPoint(const Vector3& point) const
```
对点进行逆变换。
**参数:**
- `point` - 世界空间中的点
**返回:** `Vector3` - 局部空间中的点
**复杂度:** O(1)
**示例:**
```cpp
Transform t;
Vector3 localPos = t.InverseTransformPoint(worldPos);
```

View File

@@ -0,0 +1,19 @@
# Transform::ToMatrix
```cpp
Matrix4 ToMatrix() const
```
将变换转换为 4x4 变换矩阵。
**返回:** `Matrix4` - TRS 变换矩阵
**复杂度:** O(1)
**示例:**
```cpp
Transform t;
t.position = Vector3(1.0f, 2.0f, 3.0f);
Matrix4 matrix = t.ToMatrix();
```

View File

@@ -0,0 +1,39 @@
# Transform
3D 变换结构体,包含位置、旋转和缩放,用于层次化变换。
**头文件:** `#include <XCEngine/Math/Transform.h>`
**命名空间:** `XCEngine::Math`
## Space 枚举
```cpp
enum class Space { Self, World };
```
## 结构体定义
```cpp
struct Transform {
Vector3 position = Vector3::Zero();
Quaternion rotation = Quaternion::Identity();
Vector3 scale = Vector3::One();
};
```
## 实例方法
| 方法 | 返回值 | 描述 |
|------|--------|------|
| [ToMatrix()](tomatrix.md) | `Matrix4` | 转换为 4x4 变换矩阵 |
| [Inverse()](inverse.md) | `Transform` | 逆变换 |
| `operator*(Transform, Transform)` | `Transform` | 组合变换 |
| [TransformPoint(point)](transformpoint.md) | `Vector3` | 变换点(带平移) |
| [TransformDirection(direction)](transformdirection.md) | `Vector3` | 变换方向(包含旋转和缩放) |
| [InverseTransformPoint(point)](inversetransformpoint.md) | `Vector3` | 逆变换点 |
| [InverseTransformDirection(direction)](inversetransformdirection.md) | `Vector3` | 逆变换方向 |
## 相关文档
- [Math 模块总览](../math.md) - 返回 Math 模块总览

View File

@@ -0,0 +1,22 @@
# Transform::TransformDirection
```cpp
Vector3 TransformDirection(const Vector3& direction) const
```
变换方向(仅旋转,包含缩放)。
**参数:**
- `direction` - 要变换的方向
**返回:** `Vector3` - 变换后的方向
**复杂度:** O(1)
**示例:**
```cpp
Transform t;
Vector3 localDir(1.0f, 0.0f, 0.0f);
Vector3 worldDir = t.TransformDirection(localDir);
```

View File

@@ -0,0 +1,22 @@
# Transform::TransformPoint
```cpp
Vector3 TransformPoint(const Vector3& point) const
```
变换点(包含位置、旋转和缩放)。
**参数:**
- `point` - 要变换的点
**返回:** `Vector3` - 变换后的点
**复杂度:** O(1)
**示例:**
```cpp
Transform t;
Vector3 localPos(1.0f, 0.0f, 0.0f);
Vector3 worldPos = t.TransformPoint(localPos);
```