FileDocCategorySizeDatePackage
Byte3.javaAPI DocAndroid 5.1 API8191Thu Mar 12 22:22:42 GMT 2015android.renderscript

Byte3

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

Fields Summary
public byte
x
public byte
y
public byte
z
Constructors Summary
public Byte3()

    
public Byte3(byte initX, byte initY, byte initZ)

        x = initX;
        y = initY;
        z = initZ;
    
public Byte3(Byte3 source)

hide

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

hide
Vector add
param
a

        this.x += a.x;
        this.y += a.y;
        this.z += a.z;
    
public static android.renderscript.Byte3add(android.renderscript.Byte3 a, android.renderscript.Byte3 b)

hide
Vector add
param
a
param
b
return

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

        return result;
    
public voidadd(byte value)

hide
Vector add
param
value

        x += value;
        y += value;
        z += value;
    
public static android.renderscript.Byte3add(android.renderscript.Byte3 a, byte b)

hide
Vector add
param
a
param
b
return

        Byte3 result = new Byte3();
        result.x = (byte)(a.x + b);
        result.y = (byte)(a.y + b);
        result.z = (byte)(a.z + 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;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidaddMultiple(android.renderscript.Byte3 a, byte factor)

hide
Vector add Multiple
param
a
param
factor

        x += a.x * factor;
        y += a.y * factor;
        z += a.z * 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;
    
public voiddiv(android.renderscript.Byte3 a)

hide
Vector division
param
a

        this.x /= a.x;
        this.y /= a.y;
        this.z /= a.z;
    
public static android.renderscript.Byte3div(android.renderscript.Byte3 a, android.renderscript.Byte3 b)

hide
Vector division
param
a
param
b
return

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

        return result;
    
public voiddiv(byte value)

hide
Vector division
param
value

        x /= value;
        y /= value;
        z /= value;
    
public static android.renderscript.Byte3div(android.renderscript.Byte3 a, byte b)

hide
Vector division
param
a
param
b
return

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

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

hide
Vector dot Product
param
a
return

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

hide
Vector dot Product
param
a
param
b
return

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

hide
return the element sum of vector
return

        return (byte)(x + y + z);
    
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;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public bytelength()

hide
get vector length
return

        return 3;
    
public voidmul(android.renderscript.Byte3 a)

hide
Vector multiplication
param
a

        this.x *= a.x;
        this.y *= a.y;
        this.z *= a.z;
    
public static android.renderscript.Byte3mul(android.renderscript.Byte3 a, android.renderscript.Byte3 b)

hide
Vector multiplication
param
a
param
b
return

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

        return result;
    
public voidmul(byte value)

hide
Vector multiplication
param
value

        x *= value;
        y *= value;
        z *= value;
    
public static android.renderscript.Byte3mul(android.renderscript.Byte3 a, byte b)

hide
Vector multiplication
param
a
param
b
return

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

        return result;
    
public voidnegate()

hide
set vector negate

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

hide
set vector value by Byte3
param
a

        this.x = a.x;
        this.y = a.y;
        this.z = a.z;
    
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;
        default:
            throw new IndexOutOfBoundsException("Index: i");
        }
    
public voidsetValues(byte a, byte b, byte c)

hide
set the vector field value by Char
param
a
param
b
param
c

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

hide
Vector subtraction
param
value

        x -= value;
        y -= value;
        z -= value;
    
public static android.renderscript.Byte3sub(android.renderscript.Byte3 a, byte b)

hide
Vector subtraction
param
a
param
b
return

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

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

hide
Vector subtraction
param
a

        this.x -= a.x;
        this.y -= a.y;
        this.z -= a.z;
    
public static android.renderscript.Byte3sub(android.renderscript.Byte3 a, android.renderscript.Byte3 b)

hide
Vector subtraction
param
a
param
b
return

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

        return result;