daily update on 20241226 by nitload youmu
This commit is contained in:
@@ -55,13 +55,23 @@ namespace StgSharp.Math
|
||||
[FieldOffset( 2 * 4 * sizeof( float ) )] public Vec3 Colum2;
|
||||
[FieldOffset( 3 * 4 * sizeof( float ) )] public Vec3 Colum3;
|
||||
|
||||
public Matrix34()
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
}
|
||||
|
||||
internal Matrix34( ColumnSet4 mat )
|
||||
{
|
||||
Unsafe.SkipInit( out this );
|
||||
isTransposed = false;
|
||||
this.mat = mat;
|
||||
}
|
||||
|
||||
internal Matrix34( Vector4 c0, Vector4 c1, Vector4 c2, Vector4 c3 )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
mat.colum0 = c0;
|
||||
mat.colum1 = c1;
|
||||
mat.colum2 = c2;
|
||||
@@ -82,6 +92,8 @@ namespace StgSharp.Math
|
||||
float a22,
|
||||
float a23 )
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
isTransposed = false;
|
||||
mat.colum0 = new Vector4( a00, a10, a20, 0 );
|
||||
mat.colum0 = new Vector4( a01, a11, a21, 0 );
|
||||
mat.colum0 = new Vector4( a02, a12, a22, 0 );
|
||||
@@ -215,13 +227,12 @@ namespace StgSharp.Math
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public static Matrix34 operator +( Matrix34 left, Matrix34 right )
|
||||
public static unsafe Matrix34 operator +( Matrix34 left, Matrix34 right )
|
||||
{
|
||||
return new Matrix34(
|
||||
left.mat.colum0 + right.mat.colum0,
|
||||
left.mat.colum1 + right.mat.colum1,
|
||||
left.mat.colum2 + right.mat.colum2,
|
||||
left.mat.colum3 + right.mat.colum3 );
|
||||
Matrix34 ret = new Matrix34();
|
||||
InternalIO.Intrinsic.add_mat_4(&left.mat,&right.mat,&ret.mat);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user