Class WavefrontSurfaceLoader

java.lang.Object
All Implemented Interfaces:
InterfaceIO, IconObject

public class WavefrontSurfaceLoader
extends SurfaceFileLoader
Loader for a Wavefront OBJ format surface mesh object. Based on the Obj library:

https://github.com/javagl/Obj

The format is specified here:

https://en.wikipedia.org/wiki/Wavefront_.obj_file

Since:
1.0.30
Author:
Andrew Reid
  • Constructor Details

    • WavefrontSurfaceLoader

      public WavefrontSurfaceLoader()
  • Method Details

    • loadSurface

      public Mesh3DInt loadSurface​(ProgressUpdater progress_bar, InterfaceIOOptions options) throws java.io.IOException
      Description 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 class SurfaceFileLoader
      Returns:
      Mesh3DInt mesh representing the surface being loaded
      Throws:
      java.io.IOException
    • getTitle

      public java.lang.String getTitle()
      Specified by:
      getTitle in interface InterfaceIO
      Overrides:
      getTitle in class SurfaceFileLoader
    • getFace

      protected Mesh3D.MeshFace3D getFace​(de.javagl.obj.ObjFace face)
    • getPoint3f

      protected org.jogamp.vecmath.Point3f getPoint3f​(de.javagl.obj.FloatTuple tuple)
    • getVector3f

      protected org.jogamp.vecmath.Vector3f getVector3f​(de.javagl.obj.FloatTuple tuple)