public static uint3 hashwide(float3x4 v) { return((asuint(v.c0) * uint3(0xC9CA1249u, 0x69B60C81u, 0xE0EB6C25u) + asuint(v.c1) * uint3(0xF648BEABu, 0x6BDB2B07u, 0xEF63C699u) + asuint(v.c2) * uint3(0x9001903Fu, 0xA895B9CDu, 0x9D23B201u) + asuint(v.c3) * uint3(0x4B01D3E1u, 0x7461CA0Du, 0x79725379u)) + 0xD6258E5Bu); }
public static uint hash(float3x4 v) { return(csum(asuint(v.c0) * uint3(0xF9EA92D5u, 0xC2FAFCB9u, 0x616E9CA1u) + asuint(v.c1) * uint3(0xC5C5394Bu, 0xCAE78587u, 0x7A1541C9u) + asuint(v.c2) * uint3(0xF83BD927u, 0x6A243BCBu, 0x509B84C9u) + asuint(v.c3) * uint3(0x91D13847u, 0x52F7230Fu, 0xCF286E83u)) + 0xE121E6ADu); }
public uint3x4(float3x4 v) { this.c0 = (uint3)v.c0; this.c1 = (uint3)v.c1; this.c2 = (uint3)v.c2; this.c3 = (uint3)v.c3; }
///// <summary>Return the float4x3 transpose of a float3x4 matrix.</summary> //[MethodImpl(MethodImplOptions.AggressiveInlining)] //public static sfloat4x3 transpose(sfloat3x4 v) //{ // return sfloat4x3( // v.c0.x, v.c0.y, v.c0.z, // v.c1.x, v.c1.y, v.c1.z, // v.c2.x, v.c2.y, v.c2.z, // v.c3.x, v.c3.y, v.c3.z); //} // Fast matrix inverse for rigid transforms (Orthonormal basis and translation) public static float3x4 fastinverse(float3x4 m) { float3 c0 = m.c0; float3 c1 = m.c1; float3 c2 = m.c2; float3 pos = m.c3; float3 r0 = new float3(c0.x, c1.x, c2.x); float3 r1 = new float3(c0.y, c1.y, c2.y); float3 r2 = new float3(c0.z, c1.z, c2.z); pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); return(float3x4(r0, r1, r2, pos)); }
public static uint3x4 uint3x4(float3x4 v) { return(new uint3x4(v)); }
public static int3x4 int3x4(float3x4 v) { return(new int3x4(v)); }