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
+31 -2
View File
@@ -42,7 +42,7 @@ namespace StgSharp.Math
[StructLayout(LayoutKind.Explicit, Size = (2 * 16 * sizeof(float)) + sizeof(bool), Pack = 16)]
public unsafe struct Matrix44 : IEquatable<Matrix44>
public unsafe struct Matrix44 : IEquatable<Matrix44>, IMat
{
[FieldOffset(2 * 64 * sizeof(float))] internal bool isTransposed;
@@ -152,6 +152,36 @@ namespace StgSharp.Math
0, 0, 0, 1
);
public static Matrix44 XNegativeUnit
=> new Matrix44(
-1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
public static Matrix44 YNegativeUnit
=> new Matrix44(
1, 0, 0, 0,
0, -1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
public static Matrix44 ZNegativeUnit
=> new Matrix44(
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, -1, 0,
0, 0, 0, 1
);
public static Matrix44 WNegativeUnit
=> new Matrix44(
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, -1
);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe float Det()
{
@@ -295,7 +325,6 @@ namespace StgSharp.Math
Vector4.Dot(left.transpose.colum3, right.mat.colum1),
Vector4.Dot(left.transpose.colum3, right.mat.colum2),
Vector4.Dot(left.transpose.colum3, right.mat.colum3)
);
}