used dynamicEqual instead of dynamicHashCode in BatchNode and GeometryBatchFactory

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9362 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent d33cbce333
commit c9d5011555
  1. 4
      engine/src/core/com/jme3/scene/BatchNode.java
  2. 2
      engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java

@ -259,7 +259,7 @@ public class BatchNode extends Node implements Savable {
if (list == null) {
//trying to compare materials with the isEqual method
for (Map.Entry<Material, List<Geometry>> mat : map.entrySet()) {
if (g.getMaterial().dynamicHashCode() == mat.getKey().dynamicHashCode()) {
if (g.getMaterial().dynamicEquals(mat)) {
list = mat.getValue();
}
}
@ -286,7 +286,7 @@ public class BatchNode extends Node implements Savable {
private Batch findBatchByMaterial(Material m) {
for (Batch batch : batches.getArray()) {
if (batch.geometry.getMaterial().dynamicHashCode() == m.dynamicHashCode()) {
if (batch.geometry.getMaterial().dynamicEquals(m)) {
return batch;
}
}

@ -291,7 +291,7 @@ public class GeometryBatchFactory {
if (outList == null) {
//trying to compare materials with the contentEquals method
for (Material mat : matToGeom.keySet()) {
if (geom.getMaterial().dynamicHashCode() == mat.dynamicHashCode()) {
if (geom.getMaterial().dynamicEquals(mat)){
outList = matToGeom.get(mat);
}
}

Loading…
Cancel
Save