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 SummaryNested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected static class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AssetManagerprotected intprotected Stringprotected Stringprotected intprotected final IntMap<OBJLoader.Vertex>protected ModelKeyprotected MaterialListprotected intprotected Stringprotected Nodeprotected Scannerprotected final HashMap<OBJLoader.Vertex,Integer> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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
- 
curIndexprotected int curIndex
- 
objectIndexprotected int objectIndex
- 
geomIndexprotected int geomIndex
- 
scan
- 
key
- 
assetManager
- 
matList
- 
objName
- 
objNode
 
- 
- 
Constructor Details- 
OBJLoaderpublic OBJLoader()
 
- 
- 
Method Details- 
resetpublic void reset()
- 
findVertexIndex
- 
quadToTriangle
- 
readFaceprotected void readFace()
- 
readVector3
- 
readVector2
- 
loadMtlLib- Throws:
- IOException
 
- 
nextStatementprotected boolean nextStatement()
- 
readLine- Throws:
- IOException
 
- 
createGeometryprotected Geometry createGeometry(ArrayList<OBJLoader.Face> faceList, String matName) throws IOException - Throws:
- IOException
 
- 
constructMesh
- 
loadDescription copied from interface:AssetLoaderLoads asset from the given input stream, parsing it into an application-usable object.- Specified by:
- loadin interface- AssetLoader
- Parameters:
- info- the located asset
- Returns:
- An object representing the resource.
- Throws:
- IOException- If an I/O error occurs while loading
 
 
-