com.io7m.r2.meshes

## Interface R2MeshTangentsBuilderType

-     public interface R2MeshTangentsBuilderType

  The type of mutable builders for meshes that have tangent vectors.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `addBitangent(com.io7m.jtensors.parameterized.PVectorReadable3DType<R2SpaceObjectType> p)` Add a bitangent vector.
    `long` | `addNormal(com.io7m.jtensors.parameterized.PVectorReadable3DType<R2SpaceObjectType> n)` Add a normal vector.
    `long` | `addPosition(com.io7m.jtensors.parameterized.PVectorReadable3DType<R2SpaceObjectType> p)` Add a position vector.
    `long` | `addTangent(com.io7m.jtensors.parameterized.PVectorReadable4DType<R2SpaceObjectType> p)` Add a tangent vector.
    `long` | `addTriangle(long v0, long v1, long v2)` Add a triangle.
    `long` | `addUV(com.io7m.jtensors.parameterized.PVectorReadable2DType<R2SpaceTextureType> u)` Add a UV vector.
    `long` | `addVertex(long p, long n, long t, long b, long u)` Add a vertex.
    `R2MeshTangentsType` | `build()`
    `void` | `reset()` Clear the contents of the builder

- - ### Method Detail

    - #### reset

          void reset()

      Clear the contents of the builder

    - #### addPosition

          long addPosition(com.io7m.jtensors.parameterized.PVectorReadable3DType<R2SpaceObjectType> p)

      Add a position vector.
      Parameters:
        `p` - The position
      Returns:
        The index of the added vector

    - #### addNormal

          long addNormal(com.io7m.jtensors.parameterized.PVectorReadable3DType<R2SpaceObjectType> n)

      Add a normal vector.
      Parameters:
        `n` - The normal
      Returns:
        The index of the added vector

    - #### addUV

          long addUV(com.io7m.jtensors.parameterized.PVectorReadable2DType<R2SpaceTextureType> u)

      Add a UV vector.
      Parameters:
        `u` - The UV
      Returns:
        The index of the added vector

    - #### addTangent

          long addTangent(com.io7m.jtensors.parameterized.PVectorReadable4DType<R2SpaceObjectType> p)

      Add a tangent vector.
      Parameters:
        `p` - The position
      Returns:
        The index of the added vector

    - #### addBitangent

          long addBitangent(com.io7m.jtensors.parameterized.PVectorReadable3DType<R2SpaceObjectType> p)

      Add a bitangent vector.
      Parameters:
        `p` - The position
      Returns:
        The index of the added vector

    - #### addVertex

          long addVertex(long p,
                         long n,
                         long t,
                         long b,
                         long u)
                  throws NoSuchElementException

      Add a vertex.
      Parameters:
        `p` - The index of the position vector
        `n` - The index of the normal vector
        `t` - The index of the tangent vector
        `b` - The index of the bitangent vector
        `u` - The index of the UV vector
      Returns:
        The index of the new vertex
      Throws:
        `NoSuchElementException` - Iff any of the given indices do not exist
      See Also:
        `addPosition(PVectorReadable3DType)`, `addNormal(PVectorReadable3DType)`, `addUV(PVectorReadable2DType)`, `addTangent(PVectorReadable4DType)`, `addBitangent(PVectorReadable3DType)`

    - #### addTriangle

          long addTriangle(long v0,
                           long v1,
                           long v2)
                    throws NoSuchElementException

      Add a triangle.
      Parameters:
        `v0` - The index of the first vertex
        `v1` - The index of the second vertex
        `v2` - The index of the third vertex
      Returns:
        The index of the new triangle
      Throws:
        `NoSuchElementException` - Iff any of the given vertices do not exist
      See Also:
        `addVertex(long, long, long, long, long)`

    - #### build

          R2MeshTangentsType build()

      Returns:
        A mesh with all of the data specified so far

Copyright © 2017 <code@io7m.com> http://io7m.com