Package com.jme3.scene.plugins
Class OBJLoader
java.lang.Object
com.jme3.scene.plugins.OBJLoader
- All Implemented Interfaces:
 AssetLoader
Reads OBJ format models.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected static class - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AssetManagerprotected intprotected Stringprotected Stringprotected intprotected final IntMap<OBJLoader.Vertex>protected ModelKeyprotected MaterialListprotected intprotected Stringprotected Nodeprotected Scannerprotected final HashMap<OBJLoader.Vertex,Integer>  - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected MeshconstructMesh(ArrayList<OBJLoader.Face> faceList) protected GeometrycreateGeometry(ArrayList<OBJLoader.Face> faceList, String matName) protected voidLoads asset from the given input stream, parsing it into an application-usable object.protected voidloadMtlLib(String name) protected booleanprotected OBJLoader.Face[]protected voidreadFace()protected booleanreadLine()protected Vector2fprotected Vector3fvoidreset() 
- 
Field Details
- 
verts
 - 
texCoords
 - 
norms
 - 
currentMatName
 - 
currentObjectName
 - 
vertIndexMap
 - 
indexVertMap
 - 
curIndex
protected int curIndex - 
objectIndex
protected int objectIndex - 
geomIndex
protected int geomIndex - 
scan
 - 
key
 - 
assetManager
 - 
matList
 - 
objName
 - 
objNode
 
 - 
 - 
Constructor Details
- 
OBJLoader
public OBJLoader() 
 - 
 - 
Method Details
- 
reset
public void reset() - 
findVertexIndex
 - 
quadToTriangle
 - 
readFace
protected void readFace() - 
readVector3
 - 
readVector2
 - 
loadMtlLib
- Throws:
 IOException
 - 
nextStatement
protected boolean nextStatement() - 
readLine
- Throws:
 IOException
 - 
createGeometry
protected Geometry createGeometry(ArrayList<OBJLoader.Face> faceList, String matName) throws IOException - Throws:
 IOException
 - 
constructMesh
 - 
load
Description copied from interface:AssetLoaderLoads asset from the given input stream, parsing it into an application-usable object.- Specified by:
 loadin interfaceAssetLoader- Parameters:
 info- the located asset- Returns:
 - An object representing the resource.
 - Throws:
 IOException- If an I/O error occurs while loading
 
 -