mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-19 08:41:49 -05:00
comment
This commit is contained in:
parent
fbab0007f8
commit
ff19712591
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,6 +438,9 @@ namespace VrmLib
|
|||
}},
|
||||
{typeof(UnityEngine.Matrix4x4), new GetSet<UnityEngine.Matrix4x4>{
|
||||
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),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user