Package com.ardor3d.extension.model.ply
Class PlyImporter
java.lang.Object
com.ardor3d.extension.model.ply.PlyImporter
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
PlyImporter.AbstractPropertyWithKeyword<T extends Enum<?>>
static class
static class
largely inspired of jPly's BinaryPlyInputStream, @see https://github.com/smurn/jPLY/blob/master/jply/src/main/java/org/smurn/jply/BinaryPlyInputStream.javastatic enum
static enum
static class
protected static class
PlyImporter.EnumWithKeyword<T extends Enum<?>>
static enum
static class
static enum
static class
static class
static interface
static enum
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected PlyGeometryStore
createGeometryStore
(GeometryTool geometryTool) boolean
boolean
load
(ResourceSource resource) Reads a PLY file from the given resourceload
(ResourceSource resource, GeometryTool geometryTool) Reads a PLY file from the given resourceReads a PLY file from the given resourceload
(String resource, GeometryTool geometryTool) Reads a PLY file from the given resourceprotected 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 specificationprotected 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.void
setFlipTextureVertically
(boolean flipTextureVertically) void
setMinificationFilter
(Texture.MinificationFilter minificationFilter) void
setModelLocator
(ResourceLocator locator) void
setTextureLocator
(ResourceLocator locator) void
setUseCompression
(boolean useCompression)
-
Constructor Details
-
PlyImporter
public PlyImporter()Constructor.
-
-
Method Details
-
load
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
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
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
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
-
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 numberelementWithKeyword
- element and keywordelementProperties
- properties of the elementvalues
- parsed values contained in a single line of filelineNumber
- number of the line in the PLY file being parsedstore
- 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 numberelementWithKeyword
- element and keywordelementProperties
- properties of the elementvalues
- parsed values contained in a single line of filelineNumber
- number of the line in the PLY file being parsedstore
- geometry store to fill during the process
-
setModelLocator
-
setTextureLocator
-
setFlipTextureVertically
public void setFlipTextureVertically(boolean flipTextureVertically) -
isFlipTextureVertically
public boolean isFlipTextureVertically() -
setUseCompression
public void setUseCompression(boolean useCompression) -
isUseCompression
public boolean isUseCompression() -
setMinificationFilter
-
getMinificationFilter
-