FileDocCategorySizeDatePackage
Double3.javaAPI DocAndroid 5.1 API7901Thu Mar 12 22:22:42 GMT 2015android.renderscript

Double3

public class Double3 extends Object
Vector version of the basic double type. Provides three double fields packed.

Fields Summary
public double
x
public double
y
public double
z
Constructors Summary
public Double3()

    
public Double3(Double3 data)

hide

        this.x = data.x;
        this.y = data.y;
        this.z = data.z;
    
public Double3(double x, double y, double z)

        this.x = x;
        this.y = y;
        this.z = z;
    
Methods Summary
public static android.renderscript.Double3add(android.renderscript.Double3 a, android.renderscript.Double3 b)

hide
Vector add
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x + b.x;
        res.y = a.y + b.y;
        res.z = a.z + b.z;

        return res;
    
public voidadd(android.renderscript.Double3 value)

hide
Vector add
param
value

        x += value.x;
        y += value.y;
        z += value.z;
    
public voidadd(double value)

hide
Vector add
param
value

        x += value;
        y += value;
        z += value;
    
public static android.renderscript.Double3add(android.renderscript.Double3 a, double b)

hide
Vector add
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x + b;
        res.y = a.y + b;
        res.z = a.z + b;

        return res;
    
public voidaddAt(int i, double 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.Double3 a, double factor)

hide
Vector add Multiple
param
a
param
factor

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

hide
Copy the vector to double array
param
data
param
offset

        data[offset] = x;
        data[offset + 1] = y;
        data[offset + 2] = z;
    
public voiddiv(android.renderscript.Double3 value)

hide
Vector division
param
value

        x /= value.x;
        y /= value.y;
        z /= value.z;
    
public static android.renderscript.Double3div(android.renderscript.Double3 a, android.renderscript.Double3 b)

hide
Vector division
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x / b.x;
        res.y = a.y / b.y;
        res.z = a.z / b.z;

        return res;
    
public voiddiv(double value)

hide
Vector division
param
value

        x /= value;
        y /= value;
        z /= value;
    
public static android.renderscript.Double3div(android.renderscript.Double3 a, double b)

hide
Vector division
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x / b;
        res.y = a.y / b;
        res.z = a.z / b;

        return res;
    
public doubledotProduct(android.renderscript.Double3 a)

hide
Vector dot Product
param
a
return

        return (x * a.x) + (y * a.y) + (z * a.z);
    
public static doubledotProduct(android.renderscript.Double3 a, android.renderscript.Double3 b)

hide
Vector dot Product
param
a
param
b
return

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

hide
Return the element sum of vector
return

        return x + y + z;
    
public doubleget(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 intlength()

hide
Get vector length
return

        return 3;
    
public voidmul(android.renderscript.Double3 value)

hide
Vector multiplication
param
value

        x *= value.x;
        y *= value.y;
        z *= value.z;
    
public static android.renderscript.Double3mul(android.renderscript.Double3 a, android.renderscript.Double3 b)

hide
Vector multiplication
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x * b.x;
        res.y = a.y * b.y;
        res.z = a.z * b.z;

        return res;
    
public voidmul(double value)

hide
Vector multiplication
param
value

        x *= value;
        y *= value;
        z *= value;
    
public static android.renderscript.Double3mul(android.renderscript.Double3 a, double b)

hide
Vector multiplication
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x * b;
        res.y = a.y * b;
        res.z = a.z * b;

        return res;
    
public voidnegate()

hide
Set vector negate

        x = -x;
        y = -y;
        z = -z;
    
public voidset(android.renderscript.Double3 a)

hide
Set vector value by double3
param
a

        this.x = a.x;
        this.y = a.y;
        this.z = a.z;
    
public voidsetAt(int i, double 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(double x, double y, double z)

hide
Set the vector field value
param
x
param
y
param
z

        this.x = x;
        this.y = y;
        this.z = z;
    
public voidsub(double value)

hide
Vector subtraction
param
value

        x -= value;
        y -= value;
        z -= value;
    
public static android.renderscript.Double3sub(android.renderscript.Double3 a, double b)

hide
Vector subtraction
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x - b;
        res.y = a.y - b;
        res.z = a.z - b;

        return res;
    
public voidsub(android.renderscript.Double3 value)

hide
Vector subtraction
param
value

        x -= value.x;
        y -= value.y;
        z -= value.z;
    
public static android.renderscript.Double3sub(android.renderscript.Double3 a, android.renderscript.Double3 b)

hide
Vector subtraction
param
a
param
b
return

        Double3 res = new Double3();
        res.x = a.x - b.x;
        res.y = a.y - b.y;
        res.z = a.z - b.z;

        return res;