toBytes

Convert a FloatArray to a ByteArray in native byte order.

Each float is converted to 4 bytes using IEEE 754 representation in little-endian format. The resulting byte array has size = floats.size * 4.

Return

A ByteArray containing the binary representation of this float array.


Convert a ShortArray to a ByteArray in native byte order.

Each short is converted to 2 bytes in little-endian format. The resulting byte array has size = shorts.size * 2. Commonly used for 16-bit index buffers.

Return

A ByteArray containing the binary representation of this short array.


Convert an IntArray to a ByteArray in native byte order.

Each int is converted to 4 bytes in little-endian format. The resulting byte array has size = ints.size * 4. Commonly used for 32-bit index buffers.

Return

A ByteArray containing the binary representation of this int array.