@Override public TerrainPatch clone() { TerrainPatch clone = new TerrainPatch(); clone.name = name.toString(); clone.size = size; clone.totalSize = totalSize; clone.quadrant = quadrant; clone.stepScale = stepScale.clone(); clone.offset = offset.clone(); clone.offsetAmount = offsetAmount; //clone.lodCalculator = lodCalculator.clone(); //clone.lodCalculator.setTerrainPatch(clone); //clone.setLodCalculator(lodCalculatorFactory.clone()); clone.geomap = new LODGeomap(size, geomap.getHeightArray()); clone.setLocalTranslation(getLocalTranslation().clone()); Mesh m = clone.geomap.createMesh(clone.stepScale, Vector2f.UNIT_XY, clone.offset, clone.offsetAmount, clone.totalSize, false); clone.setMesh(m); clone.setMaterial(material.clone()); return clone; }
tempOffset1.y += origin1.z / 2; TerrainPatch patch1 = new TerrainPatch(getName() + "Patch1", split, stepScale, heightBlock1, origin1, totalSize, tempOffset1, offsetAmount); tempOffset2.y += quarterSize * stepScale.z; TerrainPatch patch2 = new TerrainPatch(getName() + "Patch2", split, stepScale, heightBlock2, origin2, totalSize, tempOffset2, offsetAmount); tempOffset3.y += origin3.z / 2; TerrainPatch patch3 = new TerrainPatch(getName() + "Patch3", split, stepScale, heightBlock3, origin3, totalSize, tempOffset3, offsetAmount); tempOffset4.y += quarterSize * stepScale.z; TerrainPatch patch4 = new TerrainPatch(getName() + "Patch4", split, stepScale, heightBlock4, origin4, totalSize, tempOffset4, offsetAmount);
@Override public TerrainPatch clone() { TerrainPatch clone = new TerrainPatch(); clone.name = name.toString(); clone.size = size; clone.totalSize = totalSize; clone.quadrant = quadrant; clone.stepScale = stepScale.clone(); clone.offset = offset.clone(); clone.offsetAmount = offsetAmount; //clone.lodCalculator = lodCalculator.clone(); //clone.lodCalculator.setTerrainPatch(clone); //clone.setLodCalculator(lodCalculatorFactory.clone()); clone.geomap = new LODGeomap(size, geomap.getHeightArray()); clone.setLocalTranslation(getLocalTranslation().clone()); Mesh m = clone.geomap.createMesh(clone.stepScale, Vector2f.UNIT_XY, clone.offset, clone.offsetAmount, clone.totalSize, false); clone.setMesh(m); clone.setMaterial(material.clone()); return clone; }
tempOffset1.y += origin1.z / 2; TerrainPatch patch1 = new TerrainPatch(getName() + "Patch1", split, stepScale, heightBlock1, origin1, totalSize, tempOffset1, offsetAmount); tempOffset2.y += quarterSize * stepScale.z; TerrainPatch patch2 = new TerrainPatch(getName() + "Patch2", split, stepScale, heightBlock2, origin2, totalSize, tempOffset2, offsetAmount); tempOffset3.y += origin3.z / 2; TerrainPatch patch3 = new TerrainPatch(getName() + "Patch3", split, stepScale, heightBlock3, origin3, totalSize, tempOffset3, offsetAmount); tempOffset4.y += quarterSize * stepScale.z; TerrainPatch patch4 = new TerrainPatch(getName() + "Patch4", split, stepScale, heightBlock4, origin4, totalSize, tempOffset4, offsetAmount);