daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering

This commit is contained in:
Nitload
2023-12-08 05:36:04 +08:00
parent ae804553ce
commit ab85c1a9fe
297 changed files with 157896 additions and 5170 deletions
+13 -1
View File
@@ -9,11 +9,13 @@ namespace StgSharp.Math
public struct Matrix3x2
{
[FieldOffset(0)] internal Mat2 mat;
[FieldOffset(0)] internal vec3d colum0;
[FieldOffset(4 * 4)] internal vec3d colum1;
[FieldOffset(2 * 4 * sizeof(float))] internal Mat3 transpose;
[FieldOffset(5 * 4 * sizeof(float))] internal bool isTransposed;
public Matrix3x2(
public unsafe Matrix3x2(
float a00, float a01,
float a10, float a11,
float a20, float a21
@@ -21,6 +23,11 @@ namespace StgSharp.Math
{
mat.colum0 = new Vector4(a00, a10, a20, 0);
mat.colum0 = new Vector4(a01, a11, a21, 0);
#if NET5_0_OR_GREATER
Unsafe.SkipInit(out colum0);
Unsafe.SkipInit(out colum1);
Unsafe.SkipInit(out transpose);
#endif
}
internal Matrix3x2(
@@ -32,6 +39,11 @@ namespace StgSharp.Math
mat.colum1 = c1;
}
public vec3d VerticalVecMultiply(Vec2d vec)
{
return colum0 * vec.X + colum1 * vec.Y;
}
public unsafe float this[int rowNum, int columNum]
{
get