Beispiel #1
0
 public static uint hash(bool4x4 v)
 {
     return(csum(select(uint4(0xD19764C7u, 0xB5D0BF63u, 0xF9102C5Fu, 0x9881FB9Fu), uint4(0x56A1530Du, 0x804B722Du, 0x738E50E5u, 0x4FC93C25u), v.c0) +
                 select(uint4(0xCD0445A5u, 0xD2B90D9Bu, 0xD35C9B2Du, 0xA10D9E27u), uint4(0x568DAAA9u, 0x7530254Fu, 0x9F090439u, 0x5E9F85C9u), v.c1) +
                 select(uint4(0x8C4CA03Fu, 0xB8D969EDu, 0xAC5DB57Bu, 0xA91A02EDu), uint4(0xB3C49313u, 0xF43A9ABBu, 0x84E7E01Bu, 0x8E055BE5u), v.c2) +
                 select(uint4(0x6E624EB7u, 0x7383ED49u, 0xDD49C23Bu, 0xEBD0D005u), uint4(0x91475DF7u, 0x55E84827u, 0x90A285BBu, 0x5D19E1D5u), v.c3)));
 }
Beispiel #2
0
 public static uint4 hashwide(bool4x4 v)
 {
     return(select(uint4(0xFAAF07DDu, 0x625C45BDu, 0xC9F27FCBu, 0x6D2523B1u), uint4(0x6E2BF6A9u, 0xCC74B3B7u, 0x83B58237u, 0x833E3E29u), v.c0) +
            select(uint4(0xA9D919BFu, 0xC3EC1D97u, 0xB8B208C7u, 0x5D3ED947u), uint4(0x4473BBB1u, 0xCBA11D5Fu, 0x685835CFu, 0xC3D32AE1u), v.c1) +
            select(uint4(0xB966942Fu, 0xFE9856B3u, 0xFA3A3285u, 0xAD55999Du), uint4(0xDCDD5341u, 0x94DDD769u, 0xA1E92D39u, 0x4583C801u), v.c2) +
            select(uint4(0x9536A0F5u, 0xAF816615u, 0x9AF8D62Du, 0xE3600729u), uint4(0x5F17300Du, 0x670D6809u, 0x7AF32C49u, 0xAE131389u), v.c3));
 }
Beispiel #3
0
 public float4x4(bool4x4 v)
 {
     this.c0 = math.select(new float4(sfloat.Zero), new float4(sfloat.One), v.c0);
     this.c1 = math.select(new float4(sfloat.Zero), new float4(sfloat.One), v.c1);
     this.c2 = math.select(new float4(sfloat.Zero), new float4(sfloat.One), v.c2);
     this.c3 = math.select(new float4(sfloat.Zero), new float4(sfloat.One), v.c3);
 }
Beispiel #4
0
 public uint4x4(bool4x4 v)
 {
     this.c0 = math.select(new uint4(0u), new uint4(1u), v.c0);
     this.c1 = math.select(new uint4(0u), new uint4(1u), v.c1);
     this.c2 = math.select(new uint4(0u), new uint4(1u), v.c2);
     this.c3 = math.select(new uint4(0u), new uint4(1u), v.c3);
 }
Beispiel #5
0
 public int4x4(bool4x4 v)
 {
     this.c0 = math.select(new int4(0), new int4(1), v.c0);
     this.c1 = math.select(new int4(0), new int4(1), v.c1);
     this.c2 = math.select(new int4(0), new int4(1), v.c2);
     this.c3 = math.select(new int4(0), new int4(1), v.c3);
 }
Beispiel #6
0
 public static bool4x4 transpose(bool4x4 v)
 {
     return(bool4x4(
                v.c0.x, v.c0.y, v.c0.z, v.c0.w,
                v.c1.x, v.c1.y, v.c1.z, v.c1.w,
                v.c2.x, v.c2.y, v.c2.z, v.c2.w,
                v.c3.x, v.c3.y, v.c3.z, v.c3.w));
 }
Beispiel #7
0
 public static float4x4 float4x4(bool4x4 v)
 {
     return(new float4x4(v));
 }
Beispiel #8
0
 public static uint4x4 uint4x4(bool4x4 v)
 {
     return(new uint4x4(v));
 }
Beispiel #9
0
 public static int4x4 int4x4(bool4x4 v)
 {
     return(new int4x4(v));
 }