mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-07 13:47:06 -05:00
* MeshUtility を UniGLTF 下に移動 * Assets/VRM10 を追加 * JsonSchemaからのコード生成 UniGLTF/Editor/Generator を追加
32 lines
670 B
C#
32 lines
670 B
C#
using UnityEngine;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
struct TRS
|
|
{
|
|
public Vector3 Translation;
|
|
public Quaternion Rotation;
|
|
public Vector3 Scale;
|
|
|
|
public static TRS GetWorld(Transform t)
|
|
{
|
|
return new TRS
|
|
{
|
|
Translation = t.position,
|
|
Rotation = t.rotation,
|
|
Scale = t.lossyScale,
|
|
};
|
|
}
|
|
|
|
public static TRS GetLocal(Transform t)
|
|
{
|
|
return new TRS
|
|
{
|
|
Translation = t.localPosition,
|
|
Rotation = t.localRotation,
|
|
Scale = t.localScale,
|
|
};
|
|
}
|
|
}
|
|
}
|