Exemplo n.º 1
0
 public uint3x4(float3x4 v)
 {
     this.c0 = (uint3)v.c0;
     this.c1 = (uint3)v.c1;
     this.c2 = (uint3)v.c2;
     this.c3 = (uint3)v.c3;
 }
Exemplo n.º 2
0
 public double3x4(float3x4 v)
 {
     this.c0 = v.c0;
     this.c1 = v.c1;
     this.c2 = v.c2;
     this.c3 = v.c3;
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 public static float4x3 transpose(float3x4 v)
 {
     return(float4x3(
                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));
 }
Exemplo n.º 6
0
        // 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 = float3(c0.x, c1.x, c2.x);
            float3 r1 = float3(c0.y, c1.y, c2.y);
            float3 r2 = float3(c0.z, c1.z, c2.z);

            pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z);

            return(float3x4(r0, r1, r2, pos));
        }
Exemplo n.º 7
0
 public static uint3x4 uint3x4(float3x4 v)
 {
     return(new uint3x4(v));
 }
Exemplo n.º 8
0
 public static int3x4 int3x4(float3x4 v)
 {
     return(new int3x4(v));
 }
Exemplo n.º 9
0
 public static double3x4 double3x4(float3x4 v)
 {
     return(new double3x4(v));
 }