Package org.jbox2d.common
Class BufferUtils
java.lang.Object
org.jbox2d.common.BufferUtils
- Author:
- Daniel Murphy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[]reallocateBuffer(float[] oldBuffer, int oldCapacity, int newCapacity) Reallocate a buffer.static float[]reallocateBuffer(float[] buffer, int userSuppliedCapacity, int oldCapacity, int newCapacity, boolean deferred) Reallocate a float buffer.static int[]reallocateBuffer(int[] oldBuffer, int oldCapacity, int newCapacity) Reallocate a buffer.static int[]reallocateBuffer(int[] buffer, int userSuppliedCapacity, int oldCapacity, int newCapacity, boolean deferred) Reallocate an int buffer.static <T> T[]reallocateBuffer(Class<T> klass, T[] oldBuffer, int oldCapacity, int newCapacity) Reallocate a buffer.static <T> T[]reallocateBuffer(Class<T> klass, T[] buffer, int userSuppliedCapacity, int oldCapacity, int newCapacity, boolean deferred) Reallocate a buffer.static voidrotate(float[] ray, int first, int new_first, int last) Rotate an array, see std::rotatestatic voidrotate(int[] ray, int first, int new_first, int last) Rotate an array, see std::rotatestatic <T> voidrotate(T[] ray, int first, int new_first, int last) Rotate an array, see std::rotate
-
Constructor Details
-
BufferUtils
public BufferUtils()
-
-
Method Details
-
reallocateBuffer
public static <T> T[] reallocateBuffer(Class<T> klass, T[] oldBuffer, int oldCapacity, int newCapacity) Reallocate a buffer. -
reallocateBuffer
public static int[] reallocateBuffer(int[] oldBuffer, int oldCapacity, int newCapacity) Reallocate a buffer. -
reallocateBuffer
public static float[] reallocateBuffer(float[] oldBuffer, int oldCapacity, int newCapacity) Reallocate a buffer. -
reallocateBuffer
public static <T> T[] reallocateBuffer(Class<T> klass, T[] buffer, int userSuppliedCapacity, int oldCapacity, int newCapacity, boolean deferred) Reallocate a buffer. A 'deferred' buffer is reallocated only if it is not NULL. If 'userSuppliedCapacity' is not zero, buffer is user supplied and must be kept. -
reallocateBuffer
public static int[] reallocateBuffer(int[] buffer, int userSuppliedCapacity, int oldCapacity, int newCapacity, boolean deferred) Reallocate an int buffer. A 'deferred' buffer is reallocated only if it is not NULL. If 'userSuppliedCapacity' is not zero, buffer is user supplied and must be kept. -
reallocateBuffer
public static float[] reallocateBuffer(float[] buffer, int userSuppliedCapacity, int oldCapacity, int newCapacity, boolean deferred) Reallocate a float buffer. A 'deferred' buffer is reallocated only if it is not NULL. If 'userSuppliedCapacity' is not zero, buffer is user supplied and must be kept. -
rotate
public static <T> void rotate(T[] ray, int first, int new_first, int last) Rotate an array, see std::rotate -
rotate
public static void rotate(int[] ray, int first, int new_first, int last) Rotate an array, see std::rotate -
rotate
public static void rotate(float[] ray, int first, int new_first, int last) Rotate an array, see std::rotate
-