java.lang.Object
com.marginallyclever.ro3.mesh.load.LoadOBJ
All Implemented Interfaces:
MeshLoader

public class LoadOBJ extends Object implements MeshLoader

LoadOBJ is a MeshLoader that loads a OBJ files into a Mesh.

  • Constructor Details

    • LoadOBJ

      public LoadOBJ()
  • Method Details

    • getEnglishName

      public String getEnglishName()
      Specified by:
      getEnglishName in interface MeshLoader
    • getValidExtensions

      public String[] getValidExtensions()
      Specified by:
      getValidExtensions in interface MeshLoader
    • load

      public void load(BufferedInputStream inputStream, Mesh model) throws Exception
      Description copied from interface: MeshLoader
      Load data from stream
      Specified by:
      load in interface MeshLoader
      Parameters:
      inputStream - source of data
      model - mesh into which data will be loaded
      Throws:
      Exception - if something goes wrong
    • hasMaterial

      public boolean hasMaterial(String absolutePath)
      Does this loader find a material file near the mesh file?
      Specified by:
      hasMaterial in interface MeshLoader
      Parameters:
      absolutePath - path to mesh file
      Returns:
      true if a material file is found
    • getMaterialPath

      public String getMaterialPath(String absolutePath)
      Get the path to the material file
      Specified by:
      getMaterialPath in interface MeshLoader
      Parameters:
      absolutePath - path to mesh file
      Returns:
      path to material file or null.