FileDocCategorySizeDatePackage
VertexFrame.javaAPI DocAndroid 5.1 API4084Thu Mar 12 22:22:30 GMT 2015android.filterfw.core

VertexFrame

public class VertexFrame extends android.filterfw.core.Frame
hide

Fields Summary
private int
vertexFrameId
Constructors Summary
VertexFrame(android.filterfw.core.FrameFormat format, android.filterfw.core.FrameManager frameManager)


        
        super(format, frameManager);
        if (getFormat().getSize() <= 0) {
            throw new IllegalArgumentException("Initializing vertex frame with zero size!");
        } else {
            if (!nativeAllocate(getFormat().getSize())) {
                throw new RuntimeException("Could not allocate vertex frame!");
            }
        }
    
Methods Summary
public android.graphics.BitmapgetBitmap()

        throw new RuntimeException("Vertex frames do not support reading data!");
    
public java.nio.ByteBuffergetData()

        throw new RuntimeException("Vertex frames do not support reading data!");
    
public float[]getFloats()

        throw new RuntimeException("Vertex frames do not support reading data!");
    
public int[]getInts()

        throw new RuntimeException("Vertex frames do not support reading data!");
    
private native intgetNativeVboId()

public java.lang.ObjectgetObjectValue()

        throw new RuntimeException("Vertex frames do not support reading data!");
    
public intgetVboId()

        return getNativeVboId();
    
protected synchronized booleanhasNativeAllocation()

        return vertexFrameId != -1;
    
private native booleannativeAllocate(int size)

private native booleannativeDeallocate()

protected synchronized voidreleaseNativeAllocation()

        nativeDeallocate();
        vertexFrameId = -1;
    
public voidsetBitmap(android.graphics.Bitmap bitmap)

        throw new RuntimeException("Unsupported: Cannot set vertex frame bitmap value!");
    
public voidsetData(java.nio.ByteBuffer buffer, int offset, int length)

        assertFrameMutable();
        byte[] bytes = buffer.array();
        if (getFormat().getSize() != bytes.length) {
            throw new RuntimeException("Data size in setData does not match vertex frame size!");
        } else if (!setNativeData(bytes, offset, length)) {
            throw new RuntimeException("Could not set vertex frame data!");
        }
    
public voidsetDataFromFrame(android.filterfw.core.Frame frame)

        // TODO: Optimize
        super.setDataFromFrame(frame);
    
public voidsetFloats(float[] floats)

        assertFrameMutable();
        if (!setNativeFloats(floats)) {
            throw new RuntimeException("Could not set int values for vertex frame!");
        }
    
public voidsetInts(int[] ints)

        assertFrameMutable();
        if (!setNativeInts(ints)) {
            throw new RuntimeException("Could not set int values for vertex frame!");
        }
    
private native booleansetNativeData(byte[] data, int offset, int length)

private native booleansetNativeFloats(float[] floats)

private native booleansetNativeInts(int[] ints)

public java.lang.StringtoString()

        return "VertexFrame (" + getFormat() + ") with VBO ID " + getVboId();