|
|
|
@ -734,7 +734,7 @@ public class TerrainQuad extends Node implements Terrain { |
|
|
|
|
patch1.setModelBound(new BoundingBox()); |
|
|
|
|
patch1.updateModelBound(); |
|
|
|
|
patch1.setLodCalculator(lodCalculatorFactory); |
|
|
|
|
//TangentBinormalGenerator.generate(patch1);
|
|
|
|
|
TangentBinormalGenerator.generate(patch1); |
|
|
|
|
|
|
|
|
|
// 2 lower left
|
|
|
|
|
float[] heightBlock2 = createHeightSubBlock(heightMap, 0, split - 1, |
|
|
|
@ -756,7 +756,7 @@ public class TerrainQuad extends Node implements Terrain { |
|
|
|
|
patch2.setModelBound(new BoundingBox()); |
|
|
|
|
patch2.updateModelBound(); |
|
|
|
|
patch2.setLodCalculator(lodCalculatorFactory); |
|
|
|
|
//TangentBinormalGenerator.generate(patch2);
|
|
|
|
|
TangentBinormalGenerator.generate(patch2); |
|
|
|
|
|
|
|
|
|
// 3 upper right
|
|
|
|
|
float[] heightBlock3 = createHeightSubBlock(heightMap, split - 1, 0, |
|
|
|
@ -778,7 +778,7 @@ public class TerrainQuad extends Node implements Terrain { |
|
|
|
|
patch3.setModelBound(new BoundingBox()); |
|
|
|
|
patch3.updateModelBound(); |
|
|
|
|
patch3.setLodCalculator(lodCalculatorFactory); |
|
|
|
|
//TangentBinormalGenerator.generate(patch3);
|
|
|
|
|
TangentBinormalGenerator.generate(patch3); |
|
|
|
|
|
|
|
|
|
// 4 lower right
|
|
|
|
|
float[] heightBlock4 = createHeightSubBlock(heightMap, split - 1, |
|
|
|
@ -800,7 +800,7 @@ public class TerrainQuad extends Node implements Terrain { |
|
|
|
|
patch4.setModelBound(new BoundingBox()); |
|
|
|
|
patch4.updateModelBound(); |
|
|
|
|
patch4.setLodCalculator(lodCalculatorFactory); |
|
|
|
|
//TangentBinormalGenerator.generate(patch4);
|
|
|
|
|
TangentBinormalGenerator.generate(patch4); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public float[] createHeightSubBlock(float[] heightMap, int x, |
|
|
|
@ -878,10 +878,10 @@ public class TerrainQuad extends Node implements Terrain { |
|
|
|
|
protected boolean needToRecalculateNormals() { |
|
|
|
|
if (affectedAreaBBox != null) |
|
|
|
|
return true; |
|
|
|
|
if (!lastScale.equals(getWorldScale())) { |
|
|
|
|
/*if (!lastScale.equals(getWorldScale())) { |
|
|
|
|
lastScale = getWorldScale(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|