Added raw blend value to class
This commit is contained in:
@@ -25,6 +25,7 @@ public class Terrain {
|
|||||||
public Vector2f cell_size = new Vector2f();
|
public Vector2f cell_size = new Vector2f();
|
||||||
public Vector2f cell_count = new Vector2f();
|
public Vector2f cell_count = new Vector2f();
|
||||||
public float terrain_scale;
|
public float terrain_scale;
|
||||||
|
public Vector2f blend_values = new Vector2f();
|
||||||
public Vector2f blend_ratio = new Vector2f();
|
public Vector2f blend_ratio = new Vector2f();
|
||||||
public int heightmap;
|
public int heightmap;
|
||||||
Zone zone;
|
Zone zone;
|
||||||
@@ -62,22 +63,22 @@ public class Terrain {
|
|||||||
// the blending area between child and parent terrains when
|
// the blending area between child and parent terrains when
|
||||||
// they are stitched together.
|
// they are stitched together.
|
||||||
|
|
||||||
float max_blend = this.zone.template.max_blend;
|
this.blend_values.x = this.zone.template.max_blend;
|
||||||
float min_blend = this.zone.template.min_blend;
|
this.blend_values.y = this.zone.template.min_blend;
|
||||||
|
|
||||||
// Zones with a zero blend inherit from their parent terrain
|
// Zones with a zero blend inherit from their parent terrain
|
||||||
|
|
||||||
if (this.zone.template.max_blend == 0) {
|
if (this.zone.template.max_blend == 0) {
|
||||||
Zone parentZone = this.getNextZoneWithTerrain(this.zone.parent);
|
Zone parentZone = getNextZoneWithTerrain(this.zone.parent);
|
||||||
max_blend = parentZone.template.max_blend;
|
this.blend_values.x = parentZone.template.max_blend;
|
||||||
min_blend = parentZone.template.min_blend;
|
this.blend_values.y = parentZone.template.min_blend;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2f major_blend = new Vector2f(max_blend / this.zone.major_radius,
|
Vector2f major_blend = new Vector2f(this.blend_values.x / this.zone.major_radius,
|
||||||
min_blend / this.zone.major_radius);
|
this.blend_values.y / this.zone.major_radius);
|
||||||
|
|
||||||
Vector2f minor_blend = new Vector2f(max_blend / this.zone.minor_radius,
|
Vector2f minor_blend = new Vector2f(this.blend_values.x / this.zone.minor_radius,
|
||||||
min_blend / this.zone.minor_radius);
|
this.blend_values.y / this.zone.minor_radius);
|
||||||
|
|
||||||
if (major_blend.y > 0.4f)
|
if (major_blend.y > 0.4f)
|
||||||
blend_ratio.x = major_blend.y;
|
blend_ratio.x = major_blend.y;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class GetHeightCmd extends AbstractDevCmd {
|
|||||||
this.throwbackInfo(playerCharacter, "offset: " + "[" + childZoneOffset.x + "]" + "[" + childZoneOffset.y + "]");
|
this.throwbackInfo(playerCharacter, "offset: " + "[" + childZoneOffset.x + "]" + "[" + childZoneOffset.y + "]");
|
||||||
this.throwbackInfo(playerCharacter, "Normalized offset: " + "[" + normalizedOffset.x + "]" + "[" + normalizedOffset.y + "]");
|
this.throwbackInfo(playerCharacter, "Normalized offset: " + "[" + normalizedOffset.x + "]" + "[" + normalizedOffset.y + "]");
|
||||||
this.throwbackInfo(playerCharacter, "Heightmap blend Values: max/min" + heightmapZone.template.min_blend + " /" + heightmapZone.template.max_blend);
|
this.throwbackInfo(playerCharacter, "Heightmap blend Values: max/min" + heightmapZone.template.min_blend + " /" + heightmapZone.template.max_blend);
|
||||||
this.throwbackInfo(playerCharacter, "Parent blend Values: nax/min" + parentZone.template.min_blend + " /" + parentZone.template.max_blend);
|
this.throwbackInfo(playerCharacter, "blend Values: max/min" + heightmapZone.terrain.blend_values.x + " /" + heightmapZone.terrain.blend_values.y);
|
||||||
this.throwbackInfo(playerCharacter, "Blend coefficient: " + heightmapZone.terrain.getTerrainBlendCoefficient(childZoneOffset));
|
this.throwbackInfo(playerCharacter, "Blend coefficient: " + heightmapZone.terrain.getTerrainBlendCoefficient(childZoneOffset));
|
||||||
|
|
||||||
this.throwbackInfo(playerCharacter, "------------");
|
this.throwbackInfo(playerCharacter, "------------");
|
||||||
|
|||||||
Reference in New Issue
Block a user