rhodonite
    Preparing search index...

    Class ComplexVertexAttribute

    A complex vertex attribute that manages multiple accessors for different components (X, Y, Z, W) of a vertex attribute. This class allows vertex attributes to be stored across multiple data sources while providing a unified interface for accessing them.

    Implements

    Index
    • Retrieves a single scalar value as a 1-element array from the vertex attribute at the specified index.

      Parameters

      • i: number

        The vertex index to access

      • option: IndicesAccessOption

        Options for accessing the data (e.g., handling out-of-bounds indices)

      Returns Array1<number>

      A 1-element array containing the scalar value

    • Retrieves a 2-component vector (Vec2) as an array from the vertex attribute at the specified index.

      Parameters

      • i: number

        The vertex index to access

      • option: IndicesAccessOption

        Options for accessing the data (e.g., handling out-of-bounds indices)

      Returns Array2<number>

      A 2-element array containing the X and Y components

    • Retrieves a 3-component vector (Vec3) as an array from the vertex attribute at the specified index.

      Parameters

      • i: number

        The vertex index to access

      • option: IndicesAccessOption

        Options for accessing the data (e.g., handling out-of-bounds indices)

      Returns Array3<number>

      A 3-element array containing the X, Y, and Z components

    • Retrieves a 4-component vector (Vec4) as an array from the vertex attribute at the specified index.

      Parameters

      • i: number

        The vertex index to access

      • option: IndicesAccessOption

        Options for accessing the data (e.g., handling out-of-bounds indices)

      Returns Array4<number>

      A 4-element array containing the X, Y, Z, and W components