重新导入obi

This commit is contained in:
2026-04-06 11:35:18 +08:00
parent 05fa2d6e5e
commit ae3002a0e2
1643 changed files with 232496 additions and 13 deletions

View File

@@ -0,0 +1,34 @@
using UnityEngine;
namespace Obi
{
public struct AffineTransform
{
public Vector4 translation;
public Vector4 scale;
public Quaternion rotation;
public AffineTransform(Vector4 translation, Quaternion rotation, Vector4 scale)
{
// make sure there are good values in the 4th component:
translation[3] = 0;
scale[3] = 1;
this.translation = translation;
this.rotation = rotation;
this.scale = scale;
}
public void FromTransform(Transform source, bool is2D = false)
{
translation = source.position;
rotation = source.rotation;
scale = source.lossyScale;
if (is2D)
{
translation[2] = 0;
}
}
}
}