void setFirstTexIndex(int firstIndex, int firstCache) { if (texCache != null) { firstTexIndex = firstIndex; firstTexCache = PApplet.max(0, firstCache); } }
void setFirstTexIndex(int firstIndex, int firstCache) { if (texCache != null) { firstTexIndex = firstIndex; firstTexCache = PApplet.max(0, firstCache); } }
protected static IntBuffer allocateDirectIntBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_INT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asIntBuffer(); }
protected static FloatBuffer allocateDirectFloatBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_FLOAT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asFloatBuffer(); }
protected static IntBuffer allocateDirectIntBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_INT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asIntBuffer(); }
protected static FloatBuffer allocateDirectFloatBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_FLOAT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asFloatBuffer(); }
protected static IntBuffer allocateDirectIntBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_INT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asIntBuffer(); }
protected static ByteBuffer allocateDirectByteBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_BYTE; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()); }
protected static ByteBuffer allocateDirectByteBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_BYTE; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()); }
protected static ShortBuffer allocateDirectShortBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_SHORT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asShortBuffer(); }
protected static ShortBuffer allocateDirectShortBuffer(int size) { int bytes = PApplet.max(MIN_DIRECT_BUFFER_SIZE, size) * SIZEOF_SHORT; return ByteBuffer.allocateDirect(bytes).order(ByteOrder.nativeOrder()). asShortBuffer(); }
public void print() { int big = (int) abs(max(PApplet.max(abs(m00), abs(m01), abs(m02)), PApplet.max(abs(m10), abs(m11), abs(m12)))); int digits = 1; if (Float.isNaN(big) || Float.isInfinite(big)) { // avoid infinite loop digits = 5; } else { while ((big /= 10) != 0) digits++; // cheap log() } System.out.println(PApplet.nfs(m00, digits, 4) + " " + PApplet.nfs(m01, digits, 4) + " " + PApplet.nfs(m02, digits, 4)); System.out.println(PApplet.nfs(m10, digits, 4) + " " + PApplet.nfs(m11, digits, 4) + " " + PApplet.nfs(m12, digits, 4)); System.out.println(); }