using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TransportGame.Model.Config { public class RoadGeneratorConfig { /// /// Gets or sets the default segment length /// public float DefaultSegmentLength { get; set; } /// /// Gets or sets the highway segment length /// public float HighwaySegmentLength { get; set; } public float DefaultBranchProbability { get; set; } public float DefaultBranchPopulationTreshold { get; set; } public float HighwayBranchProbability { get; set; } public float HighwayBranchPopulationTreshold { get; set; } public int HighwayBranchDelay { get; set; } public float SteepnessLimit { get; set; } public float SlopeLimit { get; set; } public float RoadSegmentAngleLimit { get; set; } public float MinNodeDistance { get; set; } public float RoadSnapDistance { get; set; } public int MaximumRandomStraightAngle { get; set; } public int MaximumBranchAngleVariation { get; set; } public int MaximumIntersectingRoads { get; set; } public float SidewalkWidth { get; set; } public float LaneWidth { get; set; } /// /// Raises road above actual height of terrain /// public float RaiseOffset { get; set; } /// /// Height of sidewalk /// public float SidewalkHeight { get; set; } /// /// On the sides of the roads, so that we can't see under the road /// public float SideCoverHeight { get; set; } /// /// Initializes configuration with default values /// public RoadGeneratorConfig() { HighwaySegmentLength = 60; DefaultBranchPopulationTreshold = 0.12f; DefaultBranchProbability = 0.2f; DefaultSegmentLength = 24; SteepnessLimit = 10; SlopeLimit = (float)Math.PI / 7; RoadSegmentAngleLimit = (float)Math.PI / 4; RoadSnapDistance = 19; MinNodeDistance = 12; MaximumRandomStraightAngle = 45; // in degrees MaximumBranchAngleVariation = 12; // in degrees HighwayBranchPopulationTreshold = .4f; // 0..1 HighwayBranchProbability = .01f; HighwayBranchDelay = 3; MaximumIntersectingRoads = 5; SidewalkWidth = .8f; LaneWidth = 1f; RaiseOffset = 0.8f; SidewalkHeight = 0.1f; SideCoverHeight = 0.1f; } } }