Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_float4x4.hh
| Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | struct float4x4 { | ||||
| friend float4x4 operator*(const float4x4 &a, const float4x4 &b) | friend float4x4 operator*(const float4x4 &a, const float4x4 &b) | ||||
| { | { | ||||
| float4x4 result; | float4x4 result; | ||||
| mul_m4_m4m4(result.values, a.values, b.values); | mul_m4_m4m4(result.values, a.values, b.values); | ||||
| return result; | return result; | ||||
| } | } | ||||
| void operator*=(const float4x4 &other) | |||||
| { | |||||
| mul_m4_m4_post(values, other.values); | |||||
| } | |||||
| /** | /** | ||||
| * This also applies the translation on the vector. Use `m.ref_3x3() * v` if that is not | * This also applies the translation on the vector. Use `m.ref_3x3() * v` if that is not | ||||
| * intended. | * intended. | ||||
| */ | */ | ||||
| friend float3 operator*(const float4x4 &m, const float3 &v) | friend float3 operator*(const float4x4 &m, const float3 &v) | ||||
| { | { | ||||
| float3 result; | float3 result; | ||||
| mul_v3_m4v3(result, m.values, v); | mul_v3_m4v3(result, m.values, v); | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||