FileDocCategorySizeDatePackage
FieldPackerThunker.javaAPI DocAndroid 5.1 API7132Thu Mar 12 22:22:56 GMT 2015android.support.v8.renderscript

FieldPackerThunker

public class FieldPackerThunker extends Object
Utility class for packing arguments and structures from Android system objects to RenderScript objects. This class is only intended to be used to support the reflected code generated by the RS tool chain. It should not be called directly.

Fields Summary
private android.renderscript.FieldPacker
mN
private int
mPos
Constructors Summary
public FieldPackerThunker(int len)

        mN = new android.renderscript.FieldPacker(len);
        mPos = 0;
    
Methods Summary
public voidaddBoolean(boolean v)

        mN.addBoolean(v);
        mPos++;
    
public voidaddF32(float v)

        mN.addF32(v);
        mPos += 4;
    
public voidaddF32(Float2 v)

        mN.addF32(new android.renderscript.Float2(v.x, v.y));
        mPos += 8;
    
public voidaddF32(Float3 v)

        mN.addF32(new android.renderscript.Float3(v.x, v.y, v.z));
        mPos += 12;
    
public voidaddF32(Float4 v)

        mN.addF32(new android.renderscript.Float4(v.x, v.y, v.z, v.w));
        mPos += 16;
    
public voidaddF64(double v)

        mN.addF64(v);
        mPos += 8;
    
public voidaddF64(Double2 v)

        mN.addF64(new android.renderscript.Double2(v.x, v.y));
        mPos += 16;
    
public voidaddF64(Double3 v)

        mN.addF64(new android.renderscript.Double3(v.x, v.y, v.z));
        mPos += 24;
    
public voidaddF64(Double4 v)

        mN.addF64(new android.renderscript.Double4(v.x, v.y, v.z, v.w));
        mPos += 32;
    
public voidaddI16(Short2 v)

        mN.addI16(new android.renderscript.Short2(v.x, v.y));
        mPos += 4;
    
public voidaddI16(Short3 v)

        mN.addI16(new android.renderscript.Short3(v.x, v.y, v.z));
        mPos += 6;
    
public voidaddI16(Short4 v)

        mN.addI16(new android.renderscript.Short4(v.x, v.y, v.z, v.w));
        mPos += 8;
    
public voidaddI16(short v)

        mN.addI16(v);
        mPos += 2;
    
public voidaddI32(Int2 v)

        mN.addI32(new android.renderscript.Int2(v.x, v.y));
        mPos += 8;
    
public voidaddI32(Int3 v)

        mN.addI32(new android.renderscript.Int3(v.x, v.y, v.z));
        mPos += 12;
    
public voidaddI32(Int4 v)

        mN.addI32(new android.renderscript.Int4(v.x, v.y, v.z, v.w));
        mPos += 16;
    
public voidaddI32(int v)

        mN.addI32(v);
        mPos += 4;
    
public voidaddI64(Long2 v)

        mN.addI64(new android.renderscript.Long2(v.x, v.y));
        mPos += 16;
    
public voidaddI64(Long3 v)

        mN.addI64(new android.renderscript.Long3(v.x, v.y, v.z));
        mPos += 24;
    
public voidaddI64(Long4 v)

        mN.addI64(new android.renderscript.Long4(v.x, v.y, v.z, v.w));
        mPos += 32;
    
public voidaddI64(long v)

        mN.addI64(v);
        mPos += 8;
    
public voidaddI8(Byte2 v)

        mN.addI8(new android.renderscript.Byte2(v.x, v.y));
        mPos += 2;
    
public voidaddI8(Byte3 v)

        mN.addI8(new android.renderscript.Byte3(v.x, v.y, v.z));
        mPos += 3;
    
public voidaddI8(Byte4 v)

        mN.addI8(new android.renderscript.Byte4(v.x, v.y, v.z, v.w));
        mPos += 4;
    
public voidaddI8(byte v)

        mN.addI8(v);
        mPos++;
    
public voidaddMatrix(Matrix4f v)

        mN.addMatrix(new android.renderscript.Matrix4f(v.getArray()));
        mPos += (4 * 4 * 4);
    
public voidaddMatrix(Matrix3f v)

        mN.addMatrix(new android.renderscript.Matrix3f(v.getArray()));
        mPos += (3 * 3 * 4);
    
public voidaddMatrix(Matrix2f v)

        mN.addMatrix(new android.renderscript.Matrix2f(v.getArray()));
        mPos += (2 * 2 * 4);
    
public voidaddObj(BaseObj obj)

        if (obj != null) {
            mN.addObj(obj.getNObj());
        } else {
            mN.addObj(null);
        }
        mPos += 4;  // Compat lib only works in 32-bit mode, so objects are 4 bytes.
    
public voidaddU16(int v)

        mN.addU16(v);
        mPos += 2;
    
public voidaddU16(Int2 v)

        mN.addU16(new android.renderscript.Int2(v.x, v.y));
        mPos += 4;
    
public voidaddU16(Int3 v)

        mN.addU16(new android.renderscript.Int3(v.x, v.y, v.z));
        mPos += 6;
    
public voidaddU16(Int4 v)

        mN.addU16(new android.renderscript.Int4(v.x, v.y, v.z, v.w));
        mPos += 8;
    
public voidaddU32(long v)

        mN.addU32(v);
        mPos += 4;
    
public voidaddU32(Long2 v)

        mN.addU32(new android.renderscript.Long2(v.x, v.y));
        mPos += 8;
    
public voidaddU32(Long3 v)

        mN.addU32(new android.renderscript.Long3(v.x, v.y, v.z));
        mPos += 12;
    
public voidaddU32(Long4 v)

        mN.addU32(new android.renderscript.Long4(v.x, v.y, v.z, v.w));
        mPos += 16;
    
public voidaddU64(long v)

        mN.addU64(v);
        mPos += 8;
    
public voidaddU64(Long2 v)

        mN.addU64(new android.renderscript.Long2(v.x, v.y));
        mPos += 16;
    
public voidaddU64(Long3 v)

        mN.addU64(new android.renderscript.Long3(v.x, v.y, v.z));
        mPos += 24;
    
public voidaddU64(Long4 v)

        mN.addU64(new android.renderscript.Long4(v.x, v.y, v.z, v.w));
        mPos += 32;
    
public voidaddU8(short v)

        mN.addU8(v);
        mPos++;
    
public voidaddU8(Short2 v)

        mN.addU8(new android.renderscript.Short2(v.x, v.y));
        mPos += 2;
    
public voidaddU8(Short3 v)

        mN.addU8(new android.renderscript.Short3(v.x, v.y, v.z));
        mPos += 3;
    
public voidaddU8(Short4 v)

        mN.addU8(new android.renderscript.Short4(v.x, v.y, v.z, v.w));
        mPos += 4;
    
voidalign(int v)

        mN.align(v);
        while ((mPos & (v - 1)) != 0) {
            mPos++;
        }
    
public final byte[]getData()

        return mN.getData();
    
public intgetPos()

        return mPos;
    
voidreset()

        mN.reset();
        mPos = 0;
    
voidreset(int i)

        mN.reset(i);
        mPos = i;
    
public voidskip(int i)

        mN.skip(i);
        mPos += i;