PackedArray

gdext.builtin.PackedArray
See thePackedArray companion object
sealed abstract class PackedArray[E] extends AutoCloseable

Heap-owned PackedFloat32Array / PackedVector3Array values. The 16-byte handle lives in malloc'd storage so the value can outlive a call frame; call free when done (destroys the engine value and releases the storage).

Element access goes through the packed_*_operator_index interface functions, which return an interior pointer (the non-const variant triggers copy-on-write first). Indices are bounds-checked on the Scala side: the engine returns null for an out-of-range index, and dereferencing that segfaults.

Attributes

Companion
object
Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def apply(i: Int): E
def close(): Unit
def free(): Unit
def isEmpty: Boolean
def iterator: Iterator[E]
def resize(n: Int): Unit
def size: Int
def toSeq: Seq[E]
def update(i: Int, value: E): Unit