public RiverMaker(Vector3 center, float angle, RiverDef riverDef) { surfaceLevel = riverDef.widthOnMap / 2f; coordinateX = new AxisAsValueX(); coordinateZ = new AxisAsValueZ(); coordinateX = new Rotate(0.0, 0f - angle, 0.0, coordinateX); coordinateZ = new Rotate(0.0, 0f - angle, 0.0, coordinateZ); coordinateX = new Translate(0f - center.x, 0.0, 0f - center.z, coordinateX); coordinateZ = new Translate(0f - center.x, 0.0, 0f - center.z, coordinateZ); ModuleBase moduleBase = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, int.MaxValue), QualityMode.Medium); ModuleBase moduleBase2 = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, int.MaxValue), QualityMode.Medium); ModuleBase moduleBase3 = new Const(8.0); moduleBase = new Multiply(moduleBase, moduleBase3); moduleBase2 = new Multiply(moduleBase2, moduleBase3); coordinateX = new Displace(coordinateX, moduleBase, new Const(0.0), moduleBase2); coordinateZ = new Displace(coordinateZ, moduleBase, new Const(0.0), moduleBase2); generator = coordinateX; shallowizer = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, int.MaxValue), QualityMode.Medium); shallowizer = new Abs(shallowizer); }
public RiverMaker(Vector3 center, float angle, RiverDef riverDef) { this.surfaceLevel = riverDef.widthOnMap / 2f; this.coordinateX = new AxisAsValueX(); this.coordinateZ = new AxisAsValueZ(); this.coordinateX = new Rotate(0.0, (double)(-(double)angle), 0.0, this.coordinateX); this.coordinateZ = new Rotate(0.0, (double)(-(double)angle), 0.0, this.coordinateZ); this.coordinateX = new Translate((double)(-(double)center.x), 0.0, (double)(-(double)center.z), this.coordinateX); this.coordinateZ = new Translate((double)(-(double)center.x), 0.0, (double)(-(double)center.z), this.coordinateZ); ModuleBase x = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, int.MaxValue), QualityMode.Medium); ModuleBase z = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, int.MaxValue), QualityMode.Medium); ModuleBase moduleBase = new Const(8.0); x = new Multiply(x, moduleBase); z = new Multiply(z, moduleBase); this.coordinateX = new Displace(this.coordinateX, x, new Const(0.0), z); this.coordinateZ = new Displace(this.coordinateZ, x, new Const(0.0), z); this.generator = this.coordinateX; this.shallowizer = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, int.MaxValue), QualityMode.Medium); this.shallowizer = new Abs(this.shallowizer); }
public RiverMaker(Vector3 center, float angle, RiverDef riverDef) { this.surfaceLevel = (float)(riverDef.widthOnMap / 2.0); this.coordinateX = new AxisAsValueX(); this.coordinateZ = new AxisAsValueZ(); this.coordinateX = new Rotate(0.0, 0.0 - angle, 0.0, this.coordinateX); this.coordinateZ = new Rotate(0.0, 0.0 - angle, 0.0, this.coordinateZ); this.coordinateX = new Translate(0.0 - center.x, 0.0, 0.0 - center.z, this.coordinateX); this.coordinateZ = new Translate(0.0 - center.x, 0.0, 0.0 - center.z, this.coordinateZ); ModuleBase moduleBase = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, 2147483647), QualityMode.Medium); ModuleBase moduleBase2 = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, 2147483647), QualityMode.Medium); ModuleBase moduleBase3 = new Const(8.0); moduleBase = new Multiply(moduleBase, moduleBase3); moduleBase2 = new Multiply(moduleBase2, moduleBase3); this.coordinateX = new Displace(this.coordinateX, moduleBase, new Const(0.0), moduleBase2); this.coordinateZ = new Displace(this.coordinateZ, moduleBase, new Const(0.0), moduleBase2); this.generator = this.coordinateX; this.shallowizer = new Perlin(0.029999999329447746, 2.0, 0.5, 3, Rand.Range(0, 2147483647), QualityMode.Medium); this.shallowizer = new Abs(this.shallowizer); }
private static float <GenerateRiverLookupTexture> m__2(RiverDef rd) { return(rd.widthOnMap / 2f + 8f); }