This commit is contained in:
Razmoth
2023-01-06 22:33:59 +04:00
parent a3cf868dfb
commit 2b31232b30
178 changed files with 5213 additions and 23780 deletions

View File

@@ -1,27 +0,0 @@
namespace AssetStudio
{
public struct Float : IYAMLExportable
{
public float Value;
public Float(float value)
{
Value = value;
}
public static implicit operator Float(float value)
{
return new Float(value);
}
public static implicit operator float(Float value)
{
return value.Value;
}
public YAMLNode ExportYAML()
{
return new YAMLScalarNode(Value);
}
}
}

View File

@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
namespace AssetStudio
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct Quaternion : IEquatable<Quaternion>, IYAMLExportable
public struct Quaternion : IEquatable<Quaternion>
{
public float X;
public float Y;
@@ -83,17 +83,6 @@ namespace AssetStudio
return !(lhs == rhs);
}
public YAMLNode ExportYAML()
{
var node = new YAMLMappingNode();
node.Style = MappingStyle.Flow;
node.Add("x", X);
node.Add("y", Y);
node.Add("z", Z);
node.Add("w", W);
return node;
}
private const float kEpsilon = 0.000001F;
}
}

View File

@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
namespace AssetStudio
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct Vector3 : IEquatable<Vector3>, IYAMLExportable
public struct Vector3 : IEquatable<Vector3>
{
public float X;
public float Y;
@@ -87,16 +87,6 @@ namespace AssetStudio
return X * X + Y * Y + Z * Z;
}
public YAMLNode ExportYAML()
{
var node = new YAMLMappingNode();
node.Style = MappingStyle.Flow;
node.Add("x", X);
node.Add("y", Y);
node.Add("z", Z);
return node;
}
public static Vector3 Zero => new Vector3();
public static Vector3 One => new Vector3(1.0f, 1.0f, 1.0f);