diff --git a/Assets/VRM10/Runtime/UnityExtensions.cs b/Assets/VRM10/Runtime/UnityExtensions.cs index 0b340736a..936d2bcf8 100644 --- a/Assets/VRM10/Runtime/UnityExtensions.cs +++ b/Assets/VRM10/Runtime/UnityExtensions.cs @@ -106,6 +106,10 @@ namespace UniVRM10 public static Matrix4x4 RotateY180(this Matrix4x4 m) { + // R, R, R, 0 + // R, R, R, 0 + // R, R, R, 0 + // T, T, T, 1 var t = m.GetRow(3); var tt = RotateY180(t); m.SetRow(3, tt); diff --git a/Assets/VRM10/vrmlib/Runtime/NumericsExtensions.cs b/Assets/VRM10/vrmlib/Runtime/NumericsExtensions.cs index c83e121f4..54a5434f0 100644 --- a/Assets/VRM10/vrmlib/Runtime/NumericsExtensions.cs +++ b/Assets/VRM10/vrmlib/Runtime/NumericsExtensions.cs @@ -133,7 +133,10 @@ namespace VrmLib if (m.IsOnlyTranslation()) { var ret = m; - // M4x に移動が入っている + // R, R, R, 0 + // R, R, R, 0 + // R, R, R, 0 + // T, T, T, 1 ret.M43 = -ret.M43; return ret; } @@ -149,7 +152,10 @@ namespace VrmLib if (m.IsOnlyTranslation()) { var ret = m; - // M4x に移動が入っている + // R, R, R, 0 + // R, R, R, 0 + // R, R, R, 0 + // T, T, T, 1 ret.M41 = -ret.M41; return ret; } diff --git a/Assets/VRM10/vrmlib/Runtime/SpanLike.cs b/Assets/VRM10/vrmlib/Runtime/SpanLike.cs index 8efe27fa4..aa0a39965 100644 --- a/Assets/VRM10/vrmlib/Runtime/SpanLike.cs +++ b/Assets/VRM10/vrmlib/Runtime/SpanLike.cs @@ -438,6 +438,9 @@ namespace VrmLib }}, {typeof(UnityEngine.Matrix4x4), new GetSet{ Getter = (array, start) => + // UnityEngine.Matrix4x4 + // * 列優先メモリレイアウト(col0, col1, col2, col3) + // * Constructor 引き数が行優先 new Matrix4x4(row0, row1, row2, row3); new UnityEngine.Matrix4x4( new UnityEngine.Vector4(BitConverter.ToSingle(array, start), BitConverter.ToSingle(array, start + 16),