Files
XCEngine/docs/api/math/matrix4/operator_mul.md
ssdfasd b414bc5326 refactor(docs): Fix broken links across multiple modules
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.
2026-03-26 02:41:00 +08:00

44 lines
1009 B
Markdown

# Matrix4x4::operator*
```cpp
Matrix4x4 operator*(const Matrix4x4& other) const
Vector4 operator*(const Vector4& v) const
```
两个重载分别用于矩阵与矩阵乘法,以及矩阵与四维向量的乘法。
**参数(矩阵乘法):**
- `other` - 右侧矩阵
**参数(向量乘法):**
- `v` - 四维向量
**返回:**
- 矩阵乘法:结果矩阵
- 向量乘法:变换后的四维向量
**线程安全:**
**复杂度:** O(n²) - 矩阵乘法为 O(4³),向量乘法为 O(4)
**示例:**
```cpp
#include "XCEngine/Core/Math/Matrix4.h"
#include "XCEngine/Core/Math/Vector4.h"
using namespace XCEngine::Math;
Matrix4 m1 = Matrix4::RotationY(1.0f);
Matrix4 m2 = Matrix4::Translation(Vector3(1.0f, 0.0f, 0.0f));
Matrix4 combined = m1 * m2;
Vector4 v(1.0f, 0.0f, 0.0f, 1.0f);
Vector4 transformed = m1 * v;
```
## 相关文档
- [Matrix4](matrix4.md) - 返回类总览
- [MultiplyPoint](multiplypoint.md) - 点变换
- [MultiplyVector](multiplyvector.md) - 向量变换