daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user