diff options
author | Julien Gouesse <[email protected]> | 2014-02-05 22:24:57 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-02-05 22:24:57 +0100 |
commit | a6b0283809187413e7f0294d2d57ad153b70f64c (patch) | |
tree | 04825bb3df177c8f80b472270a541c3c13207505 /ardor3d-collada/src | |
parent | 443d79e798aa33aee79add21181e5b889e01be33 (diff) |
Allows to override the geometry tool when a string is passed to the loader
Diffstat (limited to 'ardor3d-collada/src')
-rw-r--r-- | ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java index 4464a0b..c8bf84f 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaImporter.java @@ -180,6 +180,22 @@ public class ColladaImporter { * if the resource can not be located or loaded for some reason. */ public ColladaStorage load(final String resource) throws IOException { + return load(resource, new GeometryTool()); + } + + /** + * Reads a Collada file from the given resource and returns it as a ColladaStorage object. + * + * @param resource + * the name of the resource to find. ResourceLocatorTool will be used with TYPE_MODEL to find the + * resource. + * @param geometryTool + * the geometry tool used to minimize the vertex count. + * @return a ColladaStorage data object containing the Collada scene and other useful elements. + * @throws IOException + * if the resource can not be located or loaded for some reason. + */ + public ColladaStorage load(final String resource, final GeometryTool geometryTool) throws IOException { final ResourceSource source; if (_modelLocator == null) { source = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL, resource); @@ -191,7 +207,7 @@ public class ColladaImporter { throw new IOException("Unable to locate '" + resource + "'"); } - return load(source); + return load(source, geometryTool); } /** |