Fudge Core
    Preparing search index...

    Class Matrix3x3

    Simple class for 3x3 matrix operations

    Jascha Karagöl, HFU, 2019 | Jirka Dell'Oro-Friedl, HFU, 2020 | Jonas Plotzky, HFU, 2025

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Accessors

    • get type(): string

      Retrieves the type of this mutable subclass as the name of the runtime class

      Returns string

      The type of the mutable

    Methods

    • (Re-)Compose this matrix from the given translation, rotation and scaling. Missing values will be decompsed from the current matrix state if necessary.

      Parameters

      • Optional_translation: Partial<Vector2>
      • Optional_rotation: number
      • Optional_scaling: Partial<Vector2>

      Returns Matrix3x3

      A reference to this matrix.

    • Set the values of this object from the given array starting at the given offset.

      Parameters

      • _array: ArrayLike<number>

        The array to read the values from.

      • _offset: number = 0

        (optional) The offset to start reading from.

      Returns this

      A reference to this instance.

    • Returns the array of the elements of this matrix.

      Returns ArrayLike<number> & Iterable<number, any, any> & ArrayBufferView<
          ArrayBufferLike,
      >

      A readonly view of the internal array.

    • Collect applicable attributes of the instance and copies of their values in a Mutator-object. By default, a mutator cannot be extended, since extensions are not available in the object the mutator belongs to. A mutator may be reduced by the descendants of Mutable to contain only the properties needed.

      Returns Mutator

    • Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses

      Parameters

      Returns void

    • Sets the elements of this matrix to the given values.

      Parameters

      • _m00: number
      • _m01: number
      • _m02: number
      • _m10: number
      • _m11: number
      • _m12: number
      • _m20: number
      • _m21: number
      • _m22: number

      Returns Matrix3x3

      A reference to this matrix.

    • Copy the values of this object into the given array starting at the given offset. Creates a new array if none is provided.

      Type Parameters

      • T extends { [n: number]: number } = number[]

      Parameters

      • _out: T = ...

        (optional) The receiving array.

      • _offset: number = 0

        (optional) The offset to start writing to.

      Returns T

      _out or a new array if none is provided.