mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-30 14:38:29 -05:00
Inverse
This commit is contained in:
parent
253846698c
commit
cc3568da14
|
|
@ -36,5 +36,11 @@ namespace UniVRM10
|
|||
public Matrix4x4 TRS(float s) => Matrix4x4.TRS(Translation, Rotation, new Vector3(s, s, s));
|
||||
|
||||
public static TR operator *(TR a, TR b) => new TR(a.Rotation * b.Rotation, a.Rotation * b.Translation + a.Translation);
|
||||
|
||||
public TR Inverse()
|
||||
{
|
||||
var inv = Quaternion.Inverse(Rotation);
|
||||
return new TR(inv, inv * Translation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user