daily uodate on 20240411 by nitload youmu, camera complete
This commit is contained in:
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user