java.lang.Object
com.marginallyclever.ro3.mesh.MeshFactory

public class MeshFactory extends Object
MeshFactory loads a mesh from a file using one of many MeshLoader classes. It also keeps a pool of all mesh loaded so that only one instance of each shape is loaded.
  • Constructor Details

    • MeshFactory

      public MeshFactory()
  • Method Details

    • load

      public Mesh load(String filename)
      Makes sure to only load one instance of each source file. Loads all the data immediately.
      Parameters:
      filename - file from which to load. May be "filename.ext" or "zipfile.zip:filename.ext"
      Returns:
      an instance of Mesh. It may contain nothing.
    • reload

      public void reload(Mesh myMesh)
    • getAllExtensions

      public List<FileFilter> getAllExtensions()
    • canLoad

      public boolean canLoad(String absolutePath)
    • hasMaterial

      public boolean hasMaterial(String absolutePath)
    • getMaterialPath

      public String getMaterialPath(String absolutePath)
    • getAllSourcesForExport

      public List<String> getAllSourcesForExport()
    • getPool

      public ListWithEvents<Mesh> getPool()
    • reset

      public void reset()
      Remove all meshes from the pool.