com.io7m.r2.meshes

## Interface R2MeshBasicBuilderType

-     public interface R2MeshBasicBuilderType

  The type of mutable builders for basic meshes.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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` | `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 u)` Add a vertex.
    `R2MeshBasicType` | `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

    - #### addVertex

          long addVertex(long p,
                         long n,
                         long u)
                  throws R2MeshExceptionMissingPosition,
                         R2MeshExceptionMissingNormal,
                         R2MeshExceptionMissingUV

      Add a vertex.
      Parameters:
        `p` - The index of the position vector
        `n` - The index of the normal vector
        `u` - The index of the UV vector
      Returns:
        The index of the new vertex
      Throws:
        `R2MeshExceptionMissingPosition` - Iff no position vector exists for `p`
        `R2MeshExceptionMissingNormal` - Iff no normal vector exists for `n`
        `R2MeshExceptionMissingUV` - Iff no UV vector exists for `u`
      See Also:
        `addPosition(PVectorReadable3DType)`, `addNormal(PVectorReadable3DType)`, `addUV(PVectorReadable2DType)`

    - #### addTriangle

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

      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:
        `R2MeshExceptionMissingVertex` - Iff any of the given vertices do not exist
      See Also:
        `addVertex(long, long, long)`

    - #### build

          R2MeshBasicType build()

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

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