Class MTLLoader

All Implemented Interfaces:

public class MTLLoader extends Object implements AssetLoader
  • Field Details

    • scan

      protected Scanner scan
    • matList

      protected MaterialList matList
    • assetManager

      protected AssetManager assetManager
    • folderName

      protected String folderName
    • key

      protected AssetKey key
    • diffuseMap

      protected Texture diffuseMap
    • normalMap

      protected Texture normalMap
    • specularMap

      protected Texture specularMap
    • alphaMap

      protected Texture alphaMap
    • ambient

      protected ColorRGBA ambient
    • diffuse

      protected ColorRGBA diffuse
    • specular

      protected ColorRGBA specular
    • shininess

      protected float shininess
    • shadeless

      protected boolean shadeless
    • matName

      protected String matName
    • alpha

      protected float alpha
    • transparent

      protected boolean transparent
    • disallowAmbient

      protected boolean disallowAmbient
    • disallowSpecular

      protected boolean disallowSpecular
  • Constructor Details

    • MTLLoader

      public MTLLoader()
  • Method Details

    • reset

      public void reset()
    • readColor

      protected ColorRGBA readColor()
    • nextStatement

      protected String nextStatement()
    • skipLine

      protected boolean skipLine()
    • resetMaterial

      protected void resetMaterial()
    • createMaterial

      protected void createMaterial()
    • startMaterial

      protected void startMaterial(String name)
    • loadTexture

      protected Texture loadTexture(String path)
    • readLine

      protected boolean readLine()
    • load

      public Object load(AssetInfo info) throws IOException
      Description copied from interface: AssetLoader
      Loads asset from the given input stream, parsing it into an application-usable object.
      Specified by:
      load in interface AssetLoader
      info - the located asset
      An object representing the resource.
      IOException - If an I/O error occurs while loading