Class ColladaImporter
java.lang.Object
com.ardor3d.extension.model.collada.jdom.ColladaImporter
Main class for importing Collada files.
Example usages: new ColladaImporter().load(resource); new ColladaImporter().loadTextures(false).modelLocator(locator).load(resource);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtraPlugin(ColladaExtraPlugin plugin) voidbooleanbooleanbooleanbooleanbooleanload(ResourceSource resource) Reads a Collada file from the given resource and returns it as a ColladaStorage object.load(ResourceSource resource, GeometryTool geometryTool) Reads a Collada file from the given resource and returns it as a ColladaStorage object.Reads a Collada file from the given resource and returns it as a ColladaStorage object.load(String resource, GeometryTool geometryTool) Reads a Collada file from the given resource and returns it as a ColladaStorage object.static floatparseFloat(String candidate) Parse a numeric value.booleansetCompressTextures(boolean compressTextures) setExternalJoints(Map<String, Joint> map) setFlipTransparency(boolean flipTransparency) setLoadAnimations(boolean loadAnimations) setLoadTextures(boolean loadTextures) setModelLocator(ResourceLocator modelLocator) voidsetOptimizeMeshes(boolean optimizeMeshes) voidsetOptimizeSettings(GeometryTool.MatchCondition... optimizeSettings) setTextureLocator(ResourceLocator textureLocator)
-
Constructor Details
-
ColladaImporter
public ColladaImporter()
-
-
Method Details
-
isLoadTextures
public boolean isLoadTextures() -
setLoadTextures
-
isCompressTextures
public boolean isCompressTextures() -
setCompressTextures
-
isLoadAnimations
public boolean isLoadAnimations() -
setLoadAnimations
-
isFlipTransparency
public boolean isFlipTransparency() -
addExtraPlugin
-
clearExtraPlugins
public void clearExtraPlugins() -
setFlipTransparency
- Parameters:
flipTransparency- if true, invert the value of any "transparency" entries found - required for some exporters.- Returns:
- this importer, for chaining
-
getTextureLocator
-
setTextureLocator
-
setExternalJoints
-
getExternalJoints
-
getModelLocator
-
setModelLocator
-
isOptimizeMeshes
public boolean isOptimizeMeshes() -
setOptimizeMeshes
public void setOptimizeMeshes(boolean optimizeMeshes) -
getOptimizeSettings
-
setOptimizeSettings
-
load
Reads a Collada file from the given resource and returns it as a ColladaStorage object.- Parameters:
resource- the name of the resource to find. ResourceLocatorTool will be used with TYPE_MODEL to find the resource.- Returns:
- 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.
-
load
Reads a Collada file from the given resource and returns it as a ColladaStorage object.- Parameters:
resource- the name of the resource to find. ResourceLocatorTool will be used with TYPE_MODEL to find the resource.geometryTool- the geometry tool used to minimize the vertex count.- Returns:
- 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.
-
load
Reads a Collada file from the given resource and returns it as a ColladaStorage object.- Parameters:
resource- the name of the resource to find.- Returns:
- a ColladaStorage data object containing the Collada scene and other useful elements.
- Throws:
IOException- if the resource can not be loaded for some reason.
-
load
Reads a Collada file from the given resource and returns it as a ColladaStorage object.- Parameters:
resource- the name of the resource to find.geometryTool- the geometry tool used to minimize the vertex count.- Returns:
- a ColladaStorage data object containing the Collada scene and other useful elements.
- Throws:
IOException- if the resource can not be loaded for some reason.
-
parseFloat
Parse a numeric value. Commas are replaced by dot automatically. Also handle special values : INF, -INF, NaN- Parameters:
candidate- the string to parse- Returns:
- float the float representing the numeric value
-
readExtra
-