public HM_Pangea(HeightmapParams vars) : base(vars) { featureDistanceSquared = Mathf.Pow((float)featureSize, 2.0f) ; InitializePangea(); ApplyDiamondSquare(); //absolutely need diamond square for this to work! ApplyForm(); ApplyScale(); ApplyHeightStep(); }
public Heightmap(HeightmapParams vars) { worldData = GameObject.Find("World").GetComponent<WorldData>(); form = vars.form; formArg = vars.formArg; mapSize = worldData.GetWorldSize(); featureSizePower = vars.featureSizePower; heightScale = vars.heightScale; heightStepped = vars.heightStepped; heightStep = Mathf.Max(vars.heightStep, 0.00001f); floatMap = new float[mapSize*mapSize]; featureSize = (int)Mathf.Pow(2.0f, (float)featureSizePower); diamondSquared = vars.diamondSquared; diamondRange = vars.diamondRange; squareRange = vars.squareRange; }
public HM_Mountains(HeightmapParams vars, Heightmap hm) : base(vars) { }
public void SetHeightParams() { heightParams = new HeightmapParams(); heightParams.form = form; heightParams.formArg = formArg; heightParams.mapSize = mapSize; heightParams.featureSizePower = featureSizePower; heightParams.heightScale = heightScale; heightParams.heightStepped = heightStepped; heightParams.heightStep = heightStep; heightParams.diamondSquared = diamondSquared; heightParams.diamondRange = diamondRange; heightParams.squareRange = squareRange; }