aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-extras/src/main
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2018-01-27 13:28:37 +0100
committerJulien Gouesse <[email protected]>2018-01-27 13:28:37 +0100
commitd6407555ecd091058500056d4a16380f796ec49e (patch)
tree4f28740e830e7ac749bcd747fc815e25391be2db /ardor3d-extras/src/main
parent2c0388a46b349bc49bc54ffd4963bd0564c714dd (diff)
Fixes a bug in the PLY importer: some already present element keywords weren't detected
Diffstat (limited to 'ardor3d-extras/src/main')
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/ply/PlyImporter.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/ply/PlyImporter.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/ply/PlyImporter.java
index c4901b7..64c93c4 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/ply/PlyImporter.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/ply/PlyImporter.java
@@ -147,13 +147,18 @@ public class PlyImporter {
/** blue color component */
BLUE(Element.VERTEX, Element.EDGE, Element.CUSTOM),
/** material (ambient light) components */
- AMBIENT_RED(Element.MATERIAL, Element.CUSTOM), AMBIENT_GREEN(Element.MATERIAL, Element.CUSTOM), AMBIENT_BLUE(Element.MATERIAL, Element.CUSTOM), AMBIENT_COEFF(Element.MATERIAL, Element.CUSTOM),
+ AMBIENT_RED(Element.MATERIAL, Element.CUSTOM), AMBIENT_GREEN(Element.MATERIAL, Element.CUSTOM), AMBIENT_BLUE(
+ Element.MATERIAL, Element.CUSTOM), AMBIENT_COEFF(Element.MATERIAL, Element.CUSTOM),
/** material (diffuse light) components */
- DIFFUSE_RED(Element.MATERIAL, Element.CUSTOM), DIFFUSE_GREEN(Element.MATERIAL, Element.CUSTOM), DIFFUSE_BLUE(Element.MATERIAL, Element.CUSTOM), DIFFUSE_COEFF(Element.MATERIAL, Element.CUSTOM),
+ DIFFUSE_RED(Element.MATERIAL, Element.CUSTOM), DIFFUSE_GREEN(Element.MATERIAL, Element.CUSTOM), DIFFUSE_BLUE(
+ Element.MATERIAL, Element.CUSTOM), DIFFUSE_COEFF(Element.MATERIAL, Element.CUSTOM),
/** material (emissive light) components */
- EMISSIVE_RED(Element.MATERIAL, Element.CUSTOM), EMISSIVE_GREEN(Element.MATERIAL, Element.CUSTOM), EMISSIVE_BLUE(Element.MATERIAL, Element.CUSTOM), EMISSIVE_COEFF(Element.MATERIAL, Element.CUSTOM),
+ EMISSIVE_RED(Element.MATERIAL, Element.CUSTOM), EMISSIVE_GREEN(Element.MATERIAL, Element.CUSTOM), EMISSIVE_BLUE(
+ Element.MATERIAL, Element.CUSTOM), EMISSIVE_COEFF(Element.MATERIAL, Element.CUSTOM),
/** material (specular light) components */
- SPECULAR_RED(Element.MATERIAL, Element.CUSTOM), SPECULAR_GREEN(Element.MATERIAL, Element.CUSTOM), SPECULAR_BLUE(Element.MATERIAL, Element.CUSTOM), SPECULAR_COEFF(Element.MATERIAL, Element.CUSTOM), SPECULAR_POWER(Element.MATERIAL, Element.CUSTOM),
+ SPECULAR_RED(Element.MATERIAL, Element.CUSTOM), SPECULAR_GREEN(Element.MATERIAL, Element.CUSTOM), SPECULAR_BLUE(
+ Element.MATERIAL, Element.CUSTOM), SPECULAR_COEFF(Element.MATERIAL,
+ Element.CUSTOM), SPECULAR_POWER(Element.MATERIAL, Element.CUSTOM),
/** custom, i.e user-defined, not build-in, up to the developer to support it */
CUSTOM(Element.CUSTOM);
private final Element[] elements;
@@ -757,7 +762,7 @@ public class PlyImporter {
final Element element = Element.get(elementName);
final ElementWithKeyword elementWithKeyword = new ElementWithKeyword(element,
elementName);
- if (elementMap.containsKey(element)) {
+ if (elementMap.containsKey(elementWithKeyword)) {
PlyImporter.LOGGER.log(Level.WARNING,
elementWithKeyword
+ " already defined, element declaration ignored on line "