daily uodate on 20240411 by nitload youmu, camera complete

This commit is contained in:
YoumuLiu
2024-04-11 02:15:22 +08:00
parent e1e416bb41
commit f0f80f72f1
144 changed files with 111879 additions and 1249 deletions
+18
View File
@@ -34,6 +34,7 @@ using StgSharp.Math;
using System;
using System.Data.Common;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace StgSharp.Math
@@ -58,6 +59,11 @@ namespace StgSharp.Math
[FieldOffset(8)] public float Z;
[FieldOffset(12)] public float W;
public override string ToString()
{
return vec.ToString();
}
public vec4d(float x, float y, float z, float w)
{
vec = new Vector4(x, y, z, w);
@@ -68,5 +74,17 @@ namespace StgSharp.Math
return vec.reg;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static vec4d operator *(Matrix44 mat, vec4d vec)
{
mat.InternalTranspose();
return new vec4d(
Vector4.Dot( mat.transpose.colum0,vec.vec),
Vector4.Dot( mat.transpose.colum1, vec.vec),
Vector4.Dot( mat.transpose.colum2, vec.vec),
Vector4.Dot( mat.transpose.colum3, vec.vec)
);
}
}
}