ByteBufferRegion


@ExperimentalCustomMeshApi
class ByteBufferRegion


A container holding a reference to a ByteBuffer, along with an offset and size.

This is used to define a specific slice or region within a buffer.

Throws
IllegalArgumentException

if offset or size is negative, or if offset + size exceeds buffer.capacity().

Summary

Public constructors

ByteBufferRegion(
    buffer: ByteBuffer,
    offset: @IntRange(from = 0) Int,
    size: @IntRange(from = 0) Int
)

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public properties

ByteBuffer

containing the data

Int

starting position within the buffer in bytes

Int

number of bytes in the region

Public constructors

ByteBufferRegion

Added in 1.0.0-alpha15
ByteBufferRegion(
    buffer: ByteBuffer,
    offset: @IntRange(from = 0) Int,
    size: @IntRange(from = 0) Int
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

buffer

Added in 1.0.0-alpha15
val bufferByteBuffer

containing the data

offset

Added in 1.0.0-alpha15
val offsetInt

starting position within the buffer in bytes

size

Added in 1.0.0-alpha15
val sizeInt

number of bytes in the region