Class PlyImporter

java.lang.Object
com.ardor3d.extension.model.ply.PlyImporter

public class PlyImporter extends Object
PLY importer. See the format spec Note that the material indices are stored but not used to build the meshes as it's currently impossible to apply a material per vertex
  • Constructor Details

    • PlyImporter

      public PlyImporter()
      Constructor.
  • Method Details

    • load

      public PlyGeometryStore load(String resource)
      Reads a PLY file from the given resource
      Parameters:
      resource - the name of the resource to find.
      Returns:
      a PlyGeometryStore data object containing the scene and other useful elements.
    • load

      public PlyGeometryStore load(String resource, GeometryTool geometryTool)
      Reads a PLY file from the given resource
      Parameters:
      resource - the name of the resource to find.
      geometryTool - the geometry tool to optimize the meshes
      Returns:
      a PlyGeometryStore data object containing the scene and other useful elements.
    • load

      public PlyGeometryStore load(ResourceSource resource)
      Reads a PLY file from the given resource
      Parameters:
      resource - the resource to find.
      Returns:
      a PlyGeometryStore data object containing the scene and other useful elements.
    • load

      public PlyGeometryStore load(ResourceSource resource, GeometryTool geometryTool)
      Reads a PLY file from the given resource
      Parameters:
      resource - the resource to find.
      geometryTool - the geometry tool to optimize the meshes
      Returns:
      a PlyGeometryStore data object containing the scene and other useful elements.
    • createGeometryStore

      protected PlyGeometryStore createGeometryStore(GeometryTool geometryTool)
    • processElementBuildInData

      protected void processElementBuildInData(PlyImporter.FormatWithVersionNumber formatWithVersionNumber, PlyImporter.ElementWithKeyword elementWithKeyword, Set<PlyImporter.AbstractPropertyWithKeyword<?>> elementProperties, double[] values, int lineNumber, PlyGeometryStore store)
      Processes the data within a build-in element, handles only the build-in properties whose behaviour is defined in the specification
      Parameters:
      formatWithVersionNumber - format with version number
      elementWithKeyword - element and keyword
      elementProperties - properties of the element
      values - parsed values contained in a single line of file
      lineNumber - number of the line in the PLY file being parsed
      store - geometry store to fill during the process
    • processElementCustomData

      protected void processElementCustomData(PlyImporter.FormatWithVersionNumber formatWithVersionNumber, PlyImporter.ElementWithKeyword elementWithKeyword, Set<PlyImporter.AbstractPropertyWithKeyword<?>> elementProperties, double[] values, int lineNumber, PlyGeometryStore store)
      Processes the data within a custom element or within a build-in element with custom properties. The default implementation just displays a warning message as it's up to the developer to manage the user-defined custom data whose behaviour isn't defined in the specification
      Parameters:
      formatWithVersionNumber - format with version number
      elementWithKeyword - element and keyword
      elementProperties - properties of the element
      values - parsed values contained in a single line of file
      lineNumber - number of the line in the PLY file being parsed
      store - geometry store to fill during the process
    • setModelLocator

      public void setModelLocator(ResourceLocator locator)
    • setTextureLocator

      public void setTextureLocator(ResourceLocator locator)
    • setFlipTextureVertically

      public void setFlipTextureVertically(boolean flipTextureVertically)
    • isFlipTextureVertically

      public boolean isFlipTextureVertically()
    • setUseCompression

      public void setUseCompression(boolean useCompression)
    • isUseCompression

      public boolean isUseCompression()
    • setMinificationFilter

      public void setMinificationFilter(Texture.MinificationFilter minificationFilter)
    • getMinificationFilter

      public Texture.MinificationFilter getMinificationFilter()