Fixed broken references: - texture-import-settings: Fix 16 files referencing wrong overview filename - math/rectint: Fix 9 method links (rectint-* → get*, contains, intersects) - rhi/opengl/device: Fix 8 cross-references (opengl-* → */**) - resources/mesh: Fix meshsection and vertexattribute links - rhi/d3d12/sampler: Fix RHISampler reference path - math/vector3: Fix projectonplane → project-on-plane - rhi/opengl/command-list: Remove broken ClearFlag enum ref - rhi/opengl/device: Create 2 new method docs (MakeContextCurrent, GetNativeContext) - rhi/device: Fix device-info types reference All 0 broken references remaining.
41 lines
859 B
Markdown
41 lines
859 B
Markdown
# Transform::Space
|
|
|
|
**命名空间**: `XCEngine::Math`
|
|
|
|
**类型**: `enum class`
|
|
|
|
**头文件**: `XCEngine/Core/Math/Transform.h`
|
|
|
|
## 概述
|
|
|
|
`Space` 枚举用于指定变换操作的参考空间。
|
|
|
|
## 枚举值
|
|
|
|
| 枚举值 | 数值 | 描述 |
|
|
|--------|------|------|
|
|
| `Self` | `0` | 相对于自身空间进行变换 |
|
|
| `World` | `1` | 相对于世界空间进行变换 |
|
|
|
|
## 使用示例
|
|
|
|
```cpp
|
|
#include "XCEngine/Core/Math/Transform.h"
|
|
#include "XCEngine/Core/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 类总览
|