Package com.ardor3d.extension.model.obj
Class ObjExporter
java.lang.Object
com.ardor3d.extension.model.obj.ObjExporter
WaveFront OBJ exporter. It supports only the meshes. Several meshes can be exported into the same OBJ file. Only a
few kinds of primitives are supported. N.B: If the texture is flipped in Ardor3D, you will have to flip it manually
when loading the resulting OBJ file.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Save a mesh to a single WaveFront OBJ file and a MTL fileprotected void
save
(Mesh mesh, File objFile, File mtlFile, boolean append, int firstVertexIndex, boolean firstFiles, List<ObjMaterial> materialList, String customTextureName) Save a mesh to the given files.void
Save several meshes to a single WaveFront OBJ file and a MTL file
-
Constructor Details
-
ObjExporter
public ObjExporter()
-
-
Method Details
-
save
Save a mesh to a single WaveFront OBJ file and a MTL file- Parameters:
mesh
- mesh to exportobjFile
- WaveFront OBJ filemtlFile
- material file, optional- Throws:
IOException
- exception
-
save
public void save(List<Mesh> meshList, File objFile, File mtlFile, String customTextureName) throws IOException Save several meshes to a single WaveFront OBJ file and a MTL file- Parameters:
meshList
- meshes to exportobjFile
- WaveFront OBJ filemtlFile
- material file, optionalcustomTextureName
- texture name that overrides the one of the mesh (except in key frames), optional- Throws:
IOException
- exception
-
save
protected void save(Mesh mesh, File objFile, File mtlFile, boolean append, int firstVertexIndex, boolean firstFiles, List<ObjMaterial> materialList, String customTextureName) throws IOException Save a mesh to the given files.- Parameters:
mesh
- mesh to exportobjFile
- WaveFront OBJ filemtlFile
- material file, optionalappend
- indicates whether the data are written to the end of the OBJ filefirstVertexIndex
- first vertex index used for this mesh during the exportfirstFiles
- indicates whether the couple of files is used for the first time, i.e there is nothing to append despite the value ofappend
materialList
- list of materials already exported in this material filecustomTextureName
- texture name that overrides the one of the mesh, optional- Throws:
IOException
- exception
-