Update API documentation and remove obsolete plan files
This commit is contained in:
40
docs/api/math/transform/space.md
Normal file
40
docs/api/math/transform/space.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Transform::Space
|
||||
|
||||
**命名空间**: `XCEngine::Math`
|
||||
|
||||
**类型**: `enum class`
|
||||
|
||||
**头文件**: `XCEngine/Math/Transform.h`
|
||||
|
||||
## 概述
|
||||
|
||||
`Space` 枚举用于指定变换操作的参考空间。
|
||||
|
||||
## 枚举值
|
||||
|
||||
| 枚举值 | 数值 | 描述 |
|
||||
|--------|------|------|
|
||||
| `Self` | `0` | 相对于自身空间进行变换 |
|
||||
| `World` | `1` | 相对于世界空间进行变换 |
|
||||
|
||||
## 使用示例
|
||||
|
||||
```cpp
|
||||
#include "XCEngine/Math/Transform.h"
|
||||
#include "XCEngine/Math/Vector3.h"
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
Transform transform;
|
||||
transform.position = Vector3(10.0f, 0.0f, 0.0f);
|
||||
|
||||
// 在自身空间旋转
|
||||
// transform.Rotate(Vector3::Up(), 45.0f * DEG_TO_RAD, Space::Self);
|
||||
|
||||
// 在世界空间旋转
|
||||
// transform.Rotate(Vector3::Up(), 45.0f * DEG_TO_RAD, Space::World);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Transform 总览](transform.md) - Transform 类总览
|
||||
Reference in New Issue
Block a user