com.jme3.scene.plugins
Class MTLLoader

java.lang.Object
  extended by com.jme3.scene.plugins.MTLLoader
All Implemented Interfaces:
AssetLoader

public class MTLLoader
extends java.lang.Object
implements AssetLoader


Field Summary
protected  float alpha
           
protected  Texture alphaMap
           
protected  ColorRGBA ambient
           
protected  AssetManager assetManager
           
protected  ColorRGBA diffuse
           
protected  Texture diffuseMap
           
protected  boolean disallowAmbient
           
protected  boolean disallowSpecular
           
protected  java.lang.String folderName
           
protected  AssetKey key
           
protected  MaterialList matList
           
protected  java.lang.String matName
           
protected  Texture normalMap
           
protected  java.util.Scanner scan
           
protected  boolean shadeless
           
protected  float shininess
           
protected  ColorRGBA specular
           
protected  Texture specularMap
           
protected  boolean transparent
           
 
Constructor Summary
MTLLoader()
           
 
Method Summary
protected  void createMaterial()
           
 java.lang.Object load(AssetInfo info)
          Loads asset from the given input stream, parsing it into an application-usable object.
protected  Texture loadTexture(java.lang.String path)
           
protected  java.lang.String nextStatement()
           
protected  ColorRGBA readColor()
           
protected  boolean readLine()
           
 void reset()
           
protected  void resetMaterial()
           
protected  boolean skipLine()
           
protected  void startMaterial(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scan

protected java.util.Scanner scan

matList

protected MaterialList matList

assetManager

protected AssetManager assetManager

folderName

protected java.lang.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 java.lang.String matName

alpha

protected float alpha

transparent

protected boolean transparent

disallowAmbient

protected boolean disallowAmbient

disallowSpecular

protected boolean disallowSpecular
Constructor Detail

MTLLoader

public MTLLoader()
Method Detail

reset

public void reset()

readColor

protected ColorRGBA readColor()

nextStatement

protected java.lang.String nextStatement()

skipLine

protected boolean skipLine()

resetMaterial

protected void resetMaterial()

createMaterial

protected void createMaterial()

startMaterial

protected void startMaterial(java.lang.String name)

loadTexture

protected Texture loadTexture(java.lang.String path)

readLine

protected boolean readLine()

load

public java.lang.Object load(AssetInfo info)
                      throws java.io.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
Returns:
An object representing the resource.
Throws:
java.io.IOException - If an I/O error occurs while loading