mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 11:59:26 -05:00
remove unused
This commit is contained in:
@@ -108,50 +108,5 @@ namespace UniGLTF
|
||||
if (m.M32 != 0) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// 移動 z反転
|
||||
// /// 回転 z反転
|
||||
// /// 拡大 据え置き
|
||||
// ///
|
||||
// /// これでいいのか?
|
||||
// /// </summary>
|
||||
// public static Matrix4x4 ReverseZ(this Matrix4x4 m)
|
||||
// {
|
||||
// if (m.IsOnlyTranslation())
|
||||
// {
|
||||
// var ret = m;
|
||||
// // R, R, R, 0
|
||||
// // R, R, R, 0
|
||||
// // R, R, R, 0
|
||||
// // T, T, T, 1
|
||||
// ret.M43 = -ret.M43;
|
||||
// return ret;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var (t, r, s) = m.Decompose();
|
||||
// return FromTRS(t.ReverseZ(), r.ReverseZ(), s);
|
||||
// }
|
||||
// }
|
||||
|
||||
// public static Matrix4x4 ReverseX(this Matrix4x4 m)
|
||||
// {
|
||||
// if (m.IsOnlyTranslation())
|
||||
// {
|
||||
// var ret = m;
|
||||
// // R, R, R, 0
|
||||
// // R, R, R, 0
|
||||
// // R, R, R, 0
|
||||
// // T, T, T, 1
|
||||
// ret.M41 = -ret.M41;
|
||||
// return ret;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var (t, r, s) = m.Decompose();
|
||||
// return FromTRS(t.ReverseX(), r.ReverseX(), s);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using VrmLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UniVRM10
|
||||
{
|
||||
public static class UnityExtension
|
||||
{
|
||||
// public static Vector3 ToUnityVector3(this System.Numerics.Vector3 value)
|
||||
// {
|
||||
// return new Vector3(value.x, value.y, value.z);
|
||||
// }
|
||||
|
||||
public static float[] ToFloat3(this Vector3 value)
|
||||
{
|
||||
return new[] { value.x, value.y, value.z };
|
||||
}
|
||||
|
||||
// public static Quaternion ToUnityQuaternion(this System.Numerics.Quaternion value)
|
||||
// {
|
||||
// return new Quaternion(value.x, value.y, value.z, value.w);
|
||||
// }
|
||||
|
||||
public static float[] ToFloat4(this Quaternion value)
|
||||
{
|
||||
return new float[] { value.x, value.y, value.z, value.w };
|
||||
}
|
||||
|
||||
// public static System.Numerics.Vector2 ToNumericsVector2(this Vector2 value)
|
||||
// {
|
||||
// return new System.Numerics.Vector2(value.x, value.y);
|
||||
// }
|
||||
|
||||
// public static System.Numerics.Vector3 ToNumericsVector3(this Vector3 value)
|
||||
// {
|
||||
// return new System.Numerics.Vector3(value.x, value.y, value.z);
|
||||
// }
|
||||
|
||||
// public static System.Numerics.Quaternion ToNumericsQuaternion(this Quaternion value)
|
||||
// {
|
||||
// return new System.Numerics.Quaternion(value.x, value.y, value.z, value.w);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,14 +83,6 @@ namespace VrmLib
|
||||
{
|
||||
(LocalTranslationWithoutUpdate, LocalRotationWithoutUpdate, LocalScalingWithoutUpdate) = value.Decompose();
|
||||
CalcWorldMatrix(Parent != null ? Parent.Matrix : Matrix4x4.identity, calcWorldMatrix);
|
||||
// if (Matrix4x4.Decompose(value, out LocalScalingWithoutUpdate, out LocalRotationWithoutUpdate, out LocalTranslationWithoutUpdate))
|
||||
// {
|
||||
// CalcWorldMatrix(Parent != null ? Parent.Matrix : Matrix4x4.identity, calcWorldMatrix);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new Exception($"fail to decompose matrix: {Name}");
|
||||
// }
|
||||
}
|
||||
|
||||
Matrix4x4 m_matrix = Matrix4x4.identity;
|
||||
@@ -98,10 +90,6 @@ namespace VrmLib
|
||||
{
|
||||
get => m_matrix;
|
||||
}
|
||||
// public void SetMatrixWithoutUpdate(Matrix4x4 m)
|
||||
// {
|
||||
// m_matrix = m;
|
||||
// }
|
||||
|
||||
public Quaternion Rotation
|
||||
{
|
||||
@@ -157,15 +145,10 @@ namespace VrmLib
|
||||
public void CalcWorldMatrix(Matrix4x4 parent, bool calcChildren = true)
|
||||
{
|
||||
var value = LocalMatrix * parent;
|
||||
// if (value == m_matrix) return;
|
||||
m_matrix = value;
|
||||
|
||||
RaiseMatrixUpdated();
|
||||
|
||||
// if (float.IsNaN(m_matrix.M11))
|
||||
// {
|
||||
// var a = 0;
|
||||
// }
|
||||
if (calcChildren)
|
||||
{
|
||||
foreach (var child in Children)
|
||||
|
||||
Reference in New Issue
Block a user