22 lines
399 B
Markdown
22 lines
399 B
Markdown
|
|
# Transform::InverseTransformDirection
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
Vector3 InverseTransformDirection(const Vector3& direction) const
|
||
|
|
```
|
||
|
|
|
||
|
|
对方向进行逆变换(包含缩放处理)。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `direction` - 世界空间中的方向
|
||
|
|
|
||
|
|
**返回:** `Vector3` - 局部空间中的方向
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
Transform t;
|
||
|
|
Vector3 localDir = t.InverseTransformDirection(worldDir);
|
||
|
|
```
|