docs: update math API docs
This commit is contained in:
30
docs/api/math/quaternion/to-matrix4x4.md
Normal file
30
docs/api/math/quaternion/to-matrix4x4.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Quaternion::ToMatrix4x4
|
||||
|
||||
```cpp
|
||||
Matrix4x4 ToMatrix4x4() const;
|
||||
```
|
||||
|
||||
将四元数转换为 4x4 旋转矩阵。
|
||||
|
||||
**返回:** 4x4 旋转矩阵
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Math/Quaternion.h>
|
||||
#include <XCEngine/Math/Matrix4.h>
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
Quaternion q = Quaternion::FromAxisAngle(Vector3::Up(), Math::Radians(90.0f));
|
||||
Matrix4 m = q.ToMatrix4x4();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Quaternion](quaternion.md) - 返回类总览
|
||||
- [FromRotationMatrix](from-rotation-matrix.md) - 从矩阵创建
|
||||
Reference in New Issue
Block a user