rhodonite
    Preparing search index...

    Interface IVector3

    Interface for immutable 3D vectors. Provides operations specific to 3-component vectors with homogeneous coordinate support.

    interface IVector3 {
        _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;
        at(i: number): number;
        clone(): IVector3;
        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;
        toString(): string;
        toStringApproximately(): string;
        v(i: number): number;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    The underlying typed array containing vector components

    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, typically 1.0 for points, 0.0 for vectors)

    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

    y: number

    The y component

    z: number

    The z component

    Methods

    • 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

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

      Parameters

      • i: number

        The component index

      Returns number

      The component value