rhodonite
    Preparing search index...

    Interface IMutableVector3

    Interface for mutable 3D vectors. Provides in-place operations for 3-component vectors including cross product and quaternion multiplication.

    interface IMutableVector3 {
        _v: TypedArray;
        bytesPerComponent: number;
        className: string;
        glslStrAsFloat: string;
        glslStrAsInt: string;
        glslStrAsUint: string;
        w: number;
        wgslStrAsFloat: string;
        wgslStrAsInt: string;
        wgslStrAsUint: string;
        x: number;
        y: number;
        z: number;
        add(vec: IVector3): IMutableVector3;
        at(i: number): number;
        clone(): IMutableVector3;
        copyComponents(vec: IVector3): IMutableVector3;
        cross(vec: IVector3): IMutableVector3;
        divide(value: number): IMutableVector3;
        divideVector(vec: IVector3): IMutableVector3;
        dot(vec: IVector3): number;
        flattenAsArray(): number[];
        isDummy(): boolean;
        isEqual(vec: IVector3, delta?: number): boolean;
        isStrictEqual(vec: IVector3): boolean;
        isTheSourceSame(arrayBuffer: ArrayBuffer): boolean;
        length(): number;
        lengthSquared(): number;
        lengthTo(vec: IVector3): number;
        multiply(value: number): IMutableVector3;
        multiplyQuaternion(quat: IQuaternion): IMutableVector3;
        multiplyVector(vec: IVector3): IMutableVector3;
        normalize(): IMutableVector3;
        one(): IMutableVector3;
        raw(): TypedArray;
        setAt(i: number, value: number): IMutableVector3;
        setComponents(x: number, y: number, z: number): IMutableVector3;
        subtract(vec: IVector3): IMutableVector3;
        toString(): string;
        toStringApproximately(): string;
        v(i: number): number;
        zero(): IMutableVector3;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    The underlying typed array containing vector components (mutable)

    bytesPerComponent: number

    Number of bytes per component in the underlying array

    className: string

    The class name identifier

    glslStrAsFloat: string

    GLSL string representation for float type

    glslStrAsInt: string

    GLSL string representation for integer type

    glslStrAsUint: string

    GLSL string representation for unsigned integer type

    w: number

    The w component (homogeneous coordinate, read-only)

    wgslStrAsFloat: string

    WGSL string representation for float type

    wgslStrAsInt: string

    WGSL string representation for integer type

    wgslStrAsUint: string

    WGSL string representation for unsigned integer type

    x: number

    The x component (mutable)

    y: number

    The y component (mutable)

    z: number

    The z component (mutable)

    • Gets component at index.

      Parameters

      • i: number

        Component index (0=x, 1=y, 2=z)

      Returns number

      Component value

    • Creates a copy of this vector.

      Returns IMutableVector3

      New mutable Vector3 instance

    • Calculates dot product with another Vector3.

      Parameters

      Returns number

      Dot product

    • Converts the vector to a flat array.

      Returns number[]

      Array containing [x, y, z]

    • Checks if this is a dummy vector.

      Returns boolean

      True if dummy

    • Checks equality with another Vector3 within tolerance.

      Parameters

      • vec: IVector3

        Vector to compare with

      • Optionaldelta: number

        Optional tolerance

      Returns boolean

      True if approximately equal

    • Checks strict equality with another Vector3.

      Parameters

      Returns boolean

      True if exactly equal

    • Checks if this vector shares the same source array buffer.

      Parameters

      • arrayBuffer: ArrayBuffer

        The array buffer to check

      Returns boolean

      True if using the same source buffer

    • Calculates vector length.

      Returns number

      Vector magnitude

    • Calculates squared length.

      Returns number

      Squared magnitude

    • Calculates distance to another Vector3.

      Parameters

      Returns number

      Distance

    • Sets component at index.

      Parameters

      • i: number

        Component index (0=x, 1=y, 2=z)

      • value: number

        New value

      Returns IMutableVector3

      This vector for chaining

    • Sets all three components.

      Parameters

      • x: number

        X component value

      • y: number

        Y component value

      • z: number

        Z component value

      Returns IMutableVector3

      This vector for chaining

    • Returns a string representation of the vector.

      Returns string

      String representation

    • Returns an approximate string representation with rounded values.

      Returns string

      Approximate string representation

    • Gets the component value at the specified index (alias for at).

      Parameters

      • i: number

        The component index

      Returns number

      The component value