omega-game-engine
    Preparing search index...

    Class Vector4

    A class representing a 4D vector, backed by a gl-matrix vec4. *

    Hierarchy (View Summary)

    Indexable

    • [key: string]: any
    Index

    Constructors

    • Creates an instance of Vector4. *

      Parameters

      • Optionalx: number = 0

        The x-component. *

      • Optionaly: number = 0

        The y-component. *

      • Optionalz: number = 0

        The z-component. *

      • Optionalw: number = 0

        The w-component.

      Returns Vector4

    Properties

    _className: string = "Vector4"
    _serializationIgnoreKeys: string[]
    _uuid: string
    _vec: vec4

    The internal gl-matrix vector. * *

    name: string = ''

    Accessors

    • get vector(): vec4

      Gets the internal gl-matrix vector. *

      Returns vec4

      • The internal vector instance.
    • get w(): number

      Gets the w-component of the vector. *

      Returns number

    • set w(value: number): void

      Sets the w-component of the vector. *

      Parameters

      • value: number

        The new value for the w-component.

      Returns void

    • get x(): number

      Gets the x-component of the vector. *

      Returns number

    • set x(value: number): void

      Sets the x-component of the vector. *

      Parameters

      • value: number

        The new value for the x-component.

      Returns void

    • get y(): number

      Gets the y-component of the vector. *

      Returns number

    • set y(value: number): void

      Sets the y-component of the vector. *

      Parameters

      • value: number

        The new value for the y-component.

      Returns void

    • get z(): number

      Gets the z-component of the vector. *

      Returns number

    • set z(value: number): void

      Sets the z-component of the vector. *

      Parameters

      • value: number

        The new value for the z-component.

      Returns void

    • get className(): string

      Returns string

    Methods

    • Sets the components of the vector. * *

      Parameters

      • Optionalx: number = 0

        The new x-component. *

      • Optionaly: number = 0

        The new y-component. *

      • Optionalz: number = 0

        The new z-component. *

      • Optionalw: number = 0

        The new w-component. *

      Returns void