21 lines
300 B
Markdown
21 lines
300 B
Markdown
|
|
# Matrix4::Translation
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
static Matrix4 Translation(const Vector3& v)
|
||
|
|
```
|
||
|
|
|
||
|
|
创建平移矩阵。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `v` - 平移向量
|
||
|
|
|
||
|
|
**返回:** `Matrix4` - 平移矩阵
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
Matrix4 translation = Matrix4::Translation(Vector3(1.0f, 2.0f, 3.0f));
|
||
|
|
```
|