used dynamicEqual instead of dynamicHashCode in BatchNode and GeometryBatchFactory
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9362 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
d33cbce333
commit
c9d5011555
@ -259,7 +259,7 @@ public class BatchNode extends Node implements Savable {
|
|||||||
if (list == null) {
|
if (list == null) {
|
||||||
//trying to compare materials with the isEqual method
|
//trying to compare materials with the isEqual method
|
||||||
for (Map.Entry<Material, List<Geometry>> mat : map.entrySet()) {
|
for (Map.Entry<Material, List<Geometry>> mat : map.entrySet()) {
|
||||||
if (g.getMaterial().dynamicHashCode() == mat.getKey().dynamicHashCode()) {
|
if (g.getMaterial().dynamicEquals(mat)) {
|
||||||
list = mat.getValue();
|
list = mat.getValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ public class BatchNode extends Node implements Savable {
|
|||||||
|
|
||||||
private Batch findBatchByMaterial(Material m) {
|
private Batch findBatchByMaterial(Material m) {
|
||||||
for (Batch batch : batches.getArray()) {
|
for (Batch batch : batches.getArray()) {
|
||||||
if (batch.geometry.getMaterial().dynamicHashCode() == m.dynamicHashCode()) {
|
if (batch.geometry.getMaterial().dynamicEquals(m)) {
|
||||||
return batch;
|
return batch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ public class GeometryBatchFactory {
|
|||||||
if (outList == null) {
|
if (outList == null) {
|
||||||
//trying to compare materials with the contentEquals method
|
//trying to compare materials with the contentEquals method
|
||||||
for (Material mat : matToGeom.keySet()) {
|
for (Material mat : matToGeom.keySet()) {
|
||||||
if (geom.getMaterial().dynamicHashCode() == mat.dynamicHashCode()) {
|
if (geom.getMaterial().dynamicEquals(mat)){
|
||||||
outList = matToGeom.get(mat);
|
outList = matToGeom.get(mat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user