From 898ff0f2edbd48f1b8f09366e2013ff300ca728e Mon Sep 17 00:00:00 2001 From: Nick Boorman Date: Wed, 3 Sep 2014 15:19:53 -0700 Subject: read extra information for nodes --- .../ardor3d/extension/model/collada/jdom/ColladaImporter.java | 2 +- .../ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'ardor3d-collada/src') 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 c8bf84f..b1e885e 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 @@ -246,7 +246,7 @@ public class ColladaImporter { _optimizeMeshes, _optimizeSettings, geometryTool); final ColladaAnimUtils colladaAnimUtils = new ColladaAnimUtils(colladaStorage, dataCache, colladaDOMUtil, colladaMeshUtils); - final ColladaNodeUtils colladaNodeUtils = new ColladaNodeUtils(dataCache, colladaDOMUtil, colladaMaterialUtils, + final ColladaNodeUtils colladaNodeUtils = new ColladaNodeUtils(this, dataCache, colladaDOMUtil, colladaMaterialUtils, colladaMeshUtils, colladaAnimUtils); try { diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java index 049fd18..b51515f 100644 --- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java +++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaNodeUtils.java @@ -41,15 +41,17 @@ import com.google.common.collect.Lists; public class ColladaNodeUtils { private static final Logger logger = Logger.getLogger(ColladaNodeUtils.class.getName()); + private final ColladaImporter _importer; private final DataCache _dataCache; private final ColladaDOMUtil _colladaDOMUtil; private final ColladaMaterialUtils _colladaMaterialUtils; private final ColladaMeshUtils _colladaMeshUtils; private final ColladaAnimUtils _colladaAnimUtils; - public ColladaNodeUtils(final DataCache dataCache, final ColladaDOMUtil colladaDOMUtil, + public ColladaNodeUtils(final ColladaImporter importer, final DataCache dataCache, final ColladaDOMUtil colladaDOMUtil, final ColladaMaterialUtils colladaMaterialUtils, final ColladaMeshUtils colladaMeshUtils, final ColladaAnimUtils colladaAnimUtils) { + _importer = importer; _dataCache = dataCache; _colladaDOMUtil = colladaDOMUtil; _colladaMaterialUtils = colladaMaterialUtils; @@ -327,6 +329,12 @@ public class ColladaNodeUtils { // Cache reference _dataCache.getElementSpatialMapping().put(dNode, node); + final Element extra = dNode.getChild("extra"); + if (extra != null) { + // process with any plugins + _importer.readExtra(extra, node); + } + return node; } -- cgit v1.2.3