com.io7m.r2.meshes.tools

## Class R2MeshConverter

- java.lang.Object
- - com.io7m.r2.meshes.tools.R2MeshConverter

- All Implemented Interfaces:
    R2MeshConverterType

      public final class R2MeshConverter
      extends Object
      implements R2MeshConverterType

  The default implementation of the `R2MeshConverterType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,R2MeshType>` | `getMeshes()`
    `void` | `loadMeshesFromFile(Path p, R2MeshFileFormat fmt)` Load all meshes from the given file.
    `void` | `loadMeshesFromFileInferred(Path p)` Load all meshes from the given file.
    `static R2MeshConverterType` | `newConverter(R2MeshConverterListenerType in_listener)`
    `void` | `writeMeshToFile(Path p, String name, R2MeshFileFormat fmt)` Write the named mesh to the given file.
    `void` | `writeMeshToFileInferred(Path p, String name)` Write the named mesh to the given file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### newConverter

          public static R2MeshConverterType newConverter(R2MeshConverterListenerType in_listener)

      Parameters:
        `in_listener` - The mesh converter listener
      Returns:
        A new mesh converter

    - #### loadMeshesFromFile

          public void loadMeshesFromFile(Path p,
                                         R2MeshFileFormat fmt)

      Description copied from interface: `R2MeshConverterType`
      Load all meshes from the given file.
      Specified by:
        `loadMeshesFromFile` in interface `R2MeshConverterType`
      Parameters:
        `p` - The file
        `fmt` - The mesh format

    - #### loadMeshesFromFileInferred

          public void loadMeshesFromFileInferred(Path p)

      Description copied from interface: `R2MeshConverterType`
      Load all meshes from the given file. The format will be inferred from the file suffix.
      Specified by:
        `loadMeshesFromFileInferred` in interface `R2MeshConverterType`
      Parameters:
        `p` - The file

    - #### getMeshes

          public Map<String,R2MeshType> getMeshes()

      Specified by:
        `getMeshes` in interface `R2MeshConverterType`
      Returns:
        A read-only view of the loaded meshes

    - #### writeMeshToFile

          public void writeMeshToFile(Path p,
                                      String name,
                                      R2MeshFileFormat fmt)

      Description copied from interface: `R2MeshConverterType`
      Write the named mesh to the given file.
      Specified by:
        `writeMeshToFile` in interface `R2MeshConverterType`
      Parameters:
        `p` - The file
        `name` - The mesh name (not used for all formats)
        `fmt` - The mesh format

    - #### writeMeshToFileInferred

          public void writeMeshToFileInferred(Path p,
                                              String name)

      Description copied from interface: `R2MeshConverterType`
      Write the named mesh to the given file. The format will be inferred from the file suffix.
      Specified by:
        `writeMeshToFileInferred` in interface `R2MeshConverterType`
      Parameters:
        `p` - The file
        `name` - The mesh name (not used for all formats)

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