Package mgui.io.foreign.wavefront
Class WavefrontSurfaceLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.shapes.InterfaceShapeLoader
mgui.io.domestic.shapes.SurfaceFileLoader
mgui.io.foreign.wavefront.WavefrontSurfaceLoader
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class WavefrontSurfaceLoader extends SurfaceFileLoader
Loader for a Wavefront OBJ format surface mesh object. Based on the Obj library:
The format is specified here:
- Since:
- 1.0.30
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL, options
-
Constructor Summary
Constructors Constructor Description WavefrontSurfaceLoader()
-
Method Summary
Modifier and Type Method Description protected Mesh3D.MeshFace3D
getFace(de.javagl.obj.ObjFace face)
protected org.jogamp.vecmath.Point3f
getPoint3f(de.javagl.obj.FloatTuple tuple)
java.lang.String
getTitle()
protected org.jogamp.vecmath.Vector3f
getVector3f(de.javagl.obj.FloatTuple tuple)
Mesh3DInt
loadSurface(ProgressUpdater progress_bar, InterfaceIOOptions options)
Loads a single surface from the appropriate source.Methods inherited from class mgui.io.domestic.shapes.SurfaceFileLoader
getFailureMessage, getObjectIcon, getSuccessMessage, getSupportedObjects, load, loadObject, loadShape, loadSurface, loadSurface, loadSurfaces
Methods inherited from class mgui.io.FileLoader
getComplementIOType, getFile, getIOType, getOptions, getProgressMessage, getWriterComplement, load, load, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
WavefrontSurfaceLoader
public WavefrontSurfaceLoader()
-
-
Method Details
-
loadSurface
public Mesh3DInt loadSurface(ProgressUpdater progress_bar, InterfaceIOOptions options) throws java.io.IOExceptionDescription copied from class:SurfaceFileLoader
Loads a single surface from the appropriate source. Returns a Mesh3DInt object if load was successful, or null otherwise. This method should also set the file loader and reference URL for the object.- Specified by:
loadSurface
in classSurfaceFileLoader
- Returns:
- Mesh3DInt mesh representing the surface being loaded
- Throws:
java.io.IOException
-
getTitle
public java.lang.String getTitle()- Specified by:
getTitle
in interfaceInterfaceIO
- Overrides:
getTitle
in classSurfaceFileLoader
-
getFace
-
getPoint3f
protected org.jogamp.vecmath.Point3f getPoint3f(de.javagl.obj.FloatTuple tuple) -
getVector3f
protected org.jogamp.vecmath.Vector3f getVector3f(de.javagl.obj.FloatTuple tuple)
-