daily update on 20230927 by nitload youmu, all polygon4 display available, optimizing on C/C# interoperation

This commit is contained in:
Nitload
2023-09-28 01:43:27 +08:00
parent 5d701bce0c
commit 6c3349f5a2
130 changed files with 3280 additions and 25074 deletions
+10 -5
View File
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
namespace StgSharp.Math
{
[StructLayout(LayoutKind.Explicit,Size = 16,Pack = 16)]
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
public struct Vec3d
{
[FieldOffset(0)]
@@ -22,7 +22,12 @@ namespace StgSharp.Math
X = x; Y = y; Z = z;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Vec3d(Vector4 vector)
{
vec = vector;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vec3d operator +(Vec3d vec1, Vec3d vec2)
{
@@ -57,9 +62,9 @@ namespace StgSharp.Math
public static Vec3d operator /(Vec3d vec, float value)
{
return new Vec3d(
vec.X/value,
vec.Y/value,
vec.Z/value
vec.X / value,
vec.Y / value,
vec.Z / value
);
}