Ejemplo n.º 1
0
 public float4(bool4 val)
 {
     x = val.x ? 1.0f : 0.0f;
     y = val.y ? 1.0f : 0.0f;
     z = val.z ? 1.0f : 0.0f;
     w = val.w ? 1.0f : 0.0f;
 }
Ejemplo n.º 2
0
 public bool4x4(bool v)
 {
     this.c0 = v;
     this.c1 = v;
     this.c2 = v;
     this.c3 = v;
 }
Ejemplo n.º 3
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public double4(bool4 val)
 {
     this.x = val.x ? 1.0f : 0.0f;
     this.y = val.y ? 1.0f : 0.0f;
     this.z = val.z ? 1.0f : 0.0f;
     this.w = val.w ? 1.0f : 0.0f;
 }
Ejemplo n.º 4
0
 public DebuggerProxy(bool4 vec)
 {
     x = vec.x;
     y = vec.y;
     z = vec.z;
     w = vec.z;
 }
Ejemplo n.º 5
0
 public bool4x4(bool4 c0, bool4 c1, bool4 c2, bool4 c3)
 {
     this.c0 = c0;
     this.c1 = c1;
     this.c2 = c2;
     this.c3 = c3;
 }
 public bool4x2(bool m00, bool m01,
                bool m10, bool m11,
                bool m20, bool m21,
                bool m30, bool m31)
 {
     this.c0 = new bool4(m00, m10, m20, m30);
     this.c1 = new bool4(m01, m11, m21, m31);
 }
Ejemplo n.º 7
0
 public bool4x3(bool m00, bool m01, bool m02,
                bool m10, bool m11, bool m12,
                bool m20, bool m21, bool m22,
                bool m30, bool m31, bool m32)
 {
     this.c0 = new bool4(m00, m10, m20, m30);
     this.c1 = new bool4(m01, m11, m21, m31);
     this.c2 = new bool4(m02, m12, m22, m32);
 }
Ejemplo n.º 8
0
 public bool4x4(bool m00, bool m01, bool m02, bool m03,
                bool m10, bool m11, bool m12, bool m13,
                bool m20, bool m21, bool m22, bool m23,
                bool m30, bool m31, bool m32, bool m33)
 {
     this.c0 = new bool4(m00, m10, m20, m30);
     this.c1 = new bool4(m01, m11, m21, m31);
     this.c2 = new bool4(m02, m12, m22, m32);
     this.c3 = new bool4(m03, m13, m23, m33);
 }
Ejemplo n.º 9
0
        // Packs components with an enabled mask (LSB) to the left
        // The value of components after the last packed component are undefined.
        // Returns the number of enabled mask bits. (0 ... 4)
        public static unsafe int compress(int *output, int index, int4 val, bool4 mask)
        {
            if (mask.x)
            {
                output[index++] = val.x;
            }
            if (mask.y)
            {
                output[index++] = val.y;
            }
            if (mask.z)
            {
                output[index++] = val.z;
            }
            if (mask.w)
            {
                output[index++] = val.w;
            }

            return(index);
        }
Ejemplo n.º 10
0
 public static bool4x4 bool4x4(bool4 c0, bool4 c1, bool4 c2, bool4 c3)
 {
     return(new bool4x4(c0, c1, c2, c3));
 }
Ejemplo n.º 11
0
 public static bool4 select(bool4 a, bool4 b, bool4 c)
 {
     return(a ^ ((a ^ b) & c));
 }
Ejemplo n.º 12
0
 public bool4x3(bool v)
 {
     this.c0 = v;
     this.c1 = v;
     this.c2 = v;
 }
 public bool4x2(bool4 c0, bool4 c1)
 {
     this.c0 = c0;
     this.c1 = c1;
 }
Ejemplo n.º 14
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool any(bool4 a)
 {
     return(a.x || a.y || a.z || a.w);
 }
Ejemplo n.º 15
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static float4 select(float4 a, float4 b, bool4 c)
 {
     return(new float4(c.x ? b.x : a.x, c.y ? b.y : a.y, c.z ? b.z : a.z, c.w ? b.w : a.w));
 }
Ejemplo n.º 16
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 select(int4 a, int4 b, bool4 c)
 {
     return(new int4(c.x ? b.x : a.x, c.y ? a.y : b.y, c.z ? b.z : a.z, c.w ? b.w : a.w));
 }
Ejemplo n.º 17
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool all(bool4 a)
 {
     return(a.x && a.y && a.z && a.w);
 }
 public static bool4x2 bool4x2(bool4 c0, bool4 c1)
 {
     return(new bool4x2(c0, c1));
 }
Ejemplo n.º 19
0
 public bool4x3(bool4 c0, bool4 c1, bool4 c2)
 {
     this.c0 = c0;
     this.c1 = c1;
     this.c2 = c2;
 }
 public bool4x2(bool v)
 {
     this.c0 = v;
     this.c1 = v;
 }
Ejemplo n.º 21
0
 public static bool4x3 bool4x3(bool4 c0, bool4 c1, bool4 c2)
 {
     return(new bool4x3(c0, c1, c2));
 }