FileDocCategorySizeDatePackage
Byte4.javaAPI DocAndroid 5.1 API9014Thu Mar 12 22:22:42 GMT 2015android.renderscript

Byte4

public class Byte4 extends Object
Class for exposing the native RenderScript byte4 type back to the Android system.

Fields Summary
public byte
x
public byte
y
public byte
z
public byte
w
Constructors Summary
public Byte4()

    
public Byte4(byte initX, byte initY, byte initZ, byte initW)

        x = initX;
        y = initY;
        z = initZ;
        w = initW;
    
public Byte4(Byte4 source)

hide

        this.x = source.x;
        this.y = source.y;
        this.z = source.z;
        this.w = source.w;
    
Methods Summary
public voidadd(android.renderscript.Byte4 a)

hide
Vector add
param
a

        this.x += a.x;
        this.y += a.y;
        this.z += a.z;
        this.w += a.w;
    
public static android.renderscript.Byte4add(android.renderscript.Byte4 a, android.renderscript.Byte4 b)

hide
Vector add
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x + b.x);
        result.y = (byte)(a.y + b.y);
        result.z = (byte)(a.z + b.z);
        result.w = (byte)(a.w + b.w);

        return result;
    
public voidadd(byte value)

hide
Vector add
param
value

        x += value;
        y += value;
        z += value;
        w += value;
    
public static android.renderscript.Byte4add(android.renderscript.Byte4 a, byte b)

hide
Vector add
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x + b);
        result.y = (byte)(a.y + b);
        result.z = (byte)(a.z + b);
        result.w = (byte)(a.w + b);

        return result;
    
public voidaddAt(int i, byte value)

hide
add the vector field value by index
param
i
param
value

        switch (i) {
        case 0:
            x += value;
            return;
        case 1:
            y += value;
            return;
        case 2:
            z += value;
            return;
        case 3:
            w += value;
            return;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidaddMultiple(android.renderscript.Byte4 a, byte factor)

hide
Vector add Multiple
param
a
param
factor

        x += a.x * factor;
        y += a.y * factor;
        z += a.z * factor;
        w += a.w * factor;
    
public voidcopyTo(byte[] data, int offset)

hide
copy the vector to Char array
param
data
param
offset

        data[offset] = x;
        data[offset + 1] = y;
        data[offset + 2] = z;
        data[offset + 3] = w;
    
public voiddiv(android.renderscript.Byte4 a)

hide
Vector division
param
a

        this.x /= a.x;
        this.y /= a.y;
        this.z /= a.z;
        this.w /= a.w;
    
public static android.renderscript.Byte4div(android.renderscript.Byte4 a, android.renderscript.Byte4 b)

hide
Vector division
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x / b.x);
        result.y = (byte)(a.y / b.y);
        result.z = (byte)(a.z / b.z);
        result.w = (byte)(a.w / b.w);

        return result;
    
public voiddiv(byte value)

hide
Vector division
param
value

        x /= value;
        y /= value;
        z /= value;
        w /= value;
    
public static android.renderscript.Byte4div(android.renderscript.Byte4 a, byte b)

hide
Vector division
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x / b);
        result.y = (byte)(a.y / b);
        result.z = (byte)(a.z / b);
        result.w = (byte)(a.w / b);

        return result;
    
public bytedotProduct(android.renderscript.Byte4 a)

hide
Vector dot Product
param
a
return

        return (byte)((x * a.x) + (y * a.y) + (z * a.z) + (w * a.w));
    
public static bytedotProduct(android.renderscript.Byte4 a, android.renderscript.Byte4 b)

hide
Vector dot Product
param
a
param
b
return

        return (byte)((b.x * a.x) + (b.y * a.y) + (b.z * a.z) + (b.w * a.w));
    
public byteelementSum()

hide
return the element sum of vector
return

        return (byte)(x + y + z + w);
    
public byteget(int i)

hide
get the vector field value by index
param
i
return

        switch (i) {
        case 0:
            return x;
        case 1:
            return y;
        case 2:
            return z;
        case 3:
            return w;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public bytelength()

hide
get vector length
return

        return 4;
    
public voidmul(android.renderscript.Byte4 a)

hide
Vector multiplication
param
a

        this.x *= a.x;
        this.y *= a.y;
        this.z *= a.z;
        this.w *= a.w;
    
public static android.renderscript.Byte4mul(android.renderscript.Byte4 a, android.renderscript.Byte4 b)

hide
Vector multiplication
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x * b.x);
        result.y = (byte)(a.y * b.y);
        result.z = (byte)(a.z * b.z);
        result.w = (byte)(a.w * b.w);

        return result;
    
public voidmul(byte value)

hide
Vector multiplication
param
value

        x *= value;
        y *= value;
        z *= value;
        w *= value;
    
public static android.renderscript.Byte4mul(android.renderscript.Byte4 a, byte b)

hide
Vector multiplication
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x * b);
        result.y = (byte)(a.y * b);
        result.z = (byte)(a.z * b);
        result.w = (byte)(a.w * b);

        return result;
    
public voidnegate()

hide
set vector negate

        this.x = (byte)(-x);
        this.y = (byte)(-y);
        this.z = (byte)(-z);
        this.w = (byte)(-w);
    
public voidset(android.renderscript.Byte4 a)

hide
set vector value by Byte4
param
a

        this.x = a.x;
        this.y = a.y;
        this.z = a.z;
        this.w = a.w;
    
public voidsetAt(int i, byte value)

hide
set the vector field value by index
param
i
param
value

        switch (i) {
        case 0:
            x = value;
            return;
        case 1:
            y = value;
            return;
        case 2:
            z = value;
            return;
        case 3:
            w = value;
            return;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidsetValues(byte a, byte b, byte c, byte d)

hide
set the vector field values
param
a
param
b
param
c
param
d

        this.x = a;
        this.y = b;
        this.z = c;
        this.w = d;
    
public voidsub(byte value)

hide
Vector subtraction
param
value

        x -= value;
        y -= value;
        z -= value;
        w -= value;
    
public static android.renderscript.Byte4sub(android.renderscript.Byte4 a, byte b)

hide
Vector subtraction
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x - b);
        result.y = (byte)(a.y - b);
        result.z = (byte)(a.z - b);
        result.w = (byte)(a.w - b);

        return result;
    
public voidsub(android.renderscript.Byte4 a)

hide
Vector subtraction
param
a

        this.x -= a.x;
        this.y -= a.y;
        this.z -= a.z;
        this.w -= a.w;
    
public static android.renderscript.Byte4sub(android.renderscript.Byte4 a, android.renderscript.Byte4 b)

hide
Vector subtraction
param
a
param
b
return

        Byte4 result = new Byte4();
        result.x = (byte)(a.x - b.x);
        result.y = (byte)(a.y - b.y);
        result.z = (byte)(a.z - b.z);
        result.w = (byte)(a.w - b.w);

        return result;