daily update on 20241226 by nitload youmu
This commit is contained in:
@@ -55,8 +55,16 @@ namespace StgSharp.Math
|
||||
[FieldOffset( 8 * sizeof( float ) )] internal Vec4 colum2;
|
||||
[FieldOffset( 12 * sizeof( float ) )] internal Vec4 colum3;
|
||||
|
||||
public Matrix44()
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
}
|
||||
|
||||
internal Matrix44( ColumnSet4 mat )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
this.mat = mat;
|
||||
}
|
||||
|
||||
@@ -66,6 +74,8 @@ namespace StgSharp.Math
|
||||
Vector4 vec2,
|
||||
Vector4 vec3 )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
mat.colum0 = vec0;
|
||||
mat.colum1 = vec1;
|
||||
mat.colum2 = vec2;
|
||||
@@ -90,6 +100,8 @@ namespace StgSharp.Math
|
||||
float a32,
|
||||
float a33 )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
mat.colum0 = new Vector4( a00, a10, a20, a30 );
|
||||
mat.colum1 = new Vector4( a01, a11, a21, a31 );
|
||||
mat.colum2 = new Vector4( a02, a12, a22, a32 );
|
||||
@@ -295,15 +307,11 @@ namespace StgSharp.Math
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public static unsafe Matrix44 operator +(
|
||||
Matrix44 left,
|
||||
Matrix44 right )
|
||||
public static unsafe Matrix44 operator +(Matrix44 left, Matrix44 right )
|
||||
{
|
||||
return new Matrix44(
|
||||
right.mat.colum0 + left.mat.colum0,
|
||||
right.mat.colum1 + left.mat.colum1,
|
||||
right.mat.colum2 + left.mat.colum2,
|
||||
right.mat.colum3 + left.mat.colum3 );
|
||||
Matrix44 ret = new Matrix44();
|
||||
InternalIO.Intrinsic.add_mat_4(&left.mat, &right.mat, &ret.mat);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static bool operator ==( Matrix44 left, Matrix44 right )
|
||||
|
||||
Reference in New Issue
Block a user