daily update on 20241226 by nitload youmu
This commit is contained in:
@@ -43,7 +43,6 @@ namespace StgSharp.Math
|
||||
Pack = 16 )]
|
||||
public struct Matrix24 : IMat
|
||||
{
|
||||
|
||||
[FieldOffset( 6 * 4 * sizeof( float ) )] internal bool isTransposed;
|
||||
[FieldOffset( 4 * 4 * sizeof( float ) )] internal ColumnSet2 transpose;
|
||||
|
||||
@@ -54,8 +53,16 @@ namespace StgSharp.Math
|
||||
[FieldOffset( 32 )] public Vec2 Colum2;
|
||||
[FieldOffset( 48 )] public Vec2 Colum3;
|
||||
|
||||
public Matrix24()
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
}
|
||||
|
||||
internal Matrix24( Vector4 c0, Vector4 c1, Vector4 c2, Vector4 c3 )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
mat.colum0 = c0;
|
||||
mat.colum1 = c1;
|
||||
mat.colum2 = c2;
|
||||
@@ -72,6 +79,8 @@ namespace StgSharp.Math
|
||||
float a12,
|
||||
float a13 )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
mat.colum0 = new Vector4( a00, a10, 0, 0 );
|
||||
mat.colum1 = new Vector4( a01, a11, 0, 0 );
|
||||
mat.colum2 = new Vector4( a02, a12, 0, 0 );
|
||||
@@ -200,13 +209,11 @@ namespace StgSharp.Math
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public static Matrix24 operator +( Matrix24 left, Matrix24 right )
|
||||
public static unsafe Matrix24 operator +( Matrix24 left, Matrix24 right )
|
||||
{
|
||||
return new Matrix24(
|
||||
left.mat.colum0 + right.mat.colum0,
|
||||
left.mat.colum1 + right.mat.colum1,
|
||||
left.mat.colum2 + right.mat.colum2,
|
||||
left.mat.colum3 + right.mat.colum3 );
|
||||
Matrix24 ret = new Matrix24();
|
||||
InternalIO.Intrinsic.add_mat_4(&left.mat,&right.mat,&ret.mat);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user