public IntersectionDecider(CurveKey key, float sampleLeftValue, float sampleRightValue, IntersectionChoice choice) { Key = key; SampleLeftValue = sampleLeftValue; SampleRightValue = sampleRightValue; Choice = choice; }
private List <CurveKey> AllIntersectOf(IntersectionChoice intersectionChoice) { return(_cgeDecider.Intersection .Where(decider => decider.Choice == intersectionChoice) .Select(decider => decider.Key) .ToList()); }
public void UpdateIntersection(IntersectionDecider intersectionDecider, IntersectionChoice newChoice) { var index = _cgeDecider.Intersection.FindIndex(decider => decider.Key == intersectionDecider.Key); _cgeDecider.Intersection[index] = new IntersectionDecider(intersectionDecider.Key, intersectionDecider.SampleLeftValue, intersectionDecider.SampleRightValue, newChoice); RegenerateCombinedPreview(); }