munum - v0.3.0
    Preparing search index...

    Class Mat4

    A 4x4 matrix.

    Hierarchy (View Summary)

    Implements

    Index
    ptr: TypedArrayPointer<Float64Array<ArrayBufferLike>>

    The pointer backing this value (owning or borrowed).

    • get buffer(): ArrayBufferLike

      Returns ArrayBufferLike

    • get byteLength(): number

      Returns number

    • get byteOffset(): number

      Returns number

    • get index(): number

      Element index of this value's first element within its view.

      Returns number

    • get length(): 16

      Returns 16

    • get valid(): boolean

      Returns boolean

    • get view(): V

      The active typed-array memory view.

      Returns V

    • Gets the value at given index.

      Parameters

      • index: number

      Returns number | undefined

    • Copies a managed array to this. Reads from from ITS OWN view and writes into this value's view, so the operands may live in different managers / element types (e.g. copying an f64 source into an f32 destination performs the numeric conversion). Assumes non-overlapping regions (true for all munum uses).

      Parameters

      Returns void

    • Calculates the determinant of this matrix.

      Returns number

    • Scales this matrix by given factor.

      Parameters

      • factor: number

      Returns this

    • Copies an array to this.

      Parameters

      • array: ArrayLike<number>
      • offset: number = 0

      Returns void

    • Single-sourced borrow helper. Wraps existing memory as a NON-owning instance of the concrete class ctor: its free()/dispose is always a no-op and the underlying storage is never freed through it. Subclasses expose a thin typed static view(...) that forwards here.

      Type Parameters

      Parameters

      • ctor: { prototype: T }

        the concrete subclass constructor (used only for its prototype)

      • size: number

        length of the region in elements

      • source: TypedArrayPointer<W> | TypedArrayViewProvider<W>

        a pointer, or a view provider (a MemoryManager, or float64View(array))

      • OptionalbyteOffset: number

        byte offset into the region; defaults to a passed pointer's own offset

      Returns T