daily update on 20230804 by nitload youmu
This commit is contained in:
@@ -1,10 +1,59 @@
|
||||
using System;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public class Matrix3x4
|
||||
{
|
||||
|
||||
internal IntPtr _row0Ptr;
|
||||
internal IntPtr _row1Ptr;
|
||||
internal IntPtr _row2Ptr;
|
||||
|
||||
private bool _isTransposed;
|
||||
private Matrix4x3 _transpose;
|
||||
|
||||
public Matrix3x4(
|
||||
float a00, float a01, float a02, float a03,
|
||||
float a10, float a11, float a12, float a13,
|
||||
float a20, float a21, float a22, float a23
|
||||
)
|
||||
{
|
||||
_row0Ptr = internalIO.load_internal(a00,a01,a02,a03);
|
||||
_row1Ptr = internalIO.load_internal(a10,a11,a12,a13);
|
||||
_row2Ptr = internalIO.load_internal(a20,a21,a22,a23);
|
||||
|
||||
_transpose = new Matrix4x3(this);
|
||||
}
|
||||
|
||||
internal Matrix3x4()
|
||||
{
|
||||
_transpose = new Matrix4x3(this);
|
||||
}
|
||||
|
||||
internal Matrix3x4(Matrix4x3 transpose)
|
||||
{
|
||||
_transpose = transpose;
|
||||
}
|
||||
|
||||
public Matrix4x3 Transpose(TransposeMode transposeMode)
|
||||
{
|
||||
switch (transposeMode)
|
||||
{
|
||||
case TransposeMode.New:
|
||||
return new Matrix4x3();
|
||||
break;
|
||||
case TransposeMode.Copy:
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new Exception();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user