public Catenary(ISpan span, double weight, double H) : base(span) { this.weight = weight; this.horizontalTension = H; this.RelativeCenter = CatenaryCalculator.CenterPosition(Step, this.weight, H); this.SpanChanged += new EventArgs <Span> .Handler(Catenary_SpanChanged); this.CatenaryChanged += new EventArgs <Catenary> .Handler(Catenary_CatenaryChanged); }
/// <summary> /// Helper function that calculates the catenary lowest point and triggers property changed notifiers /// </summary> protected internal void CalculateCenter() { this.RelativeCenter = CatenaryCalculator.CenterPosition(Step, weight, horizontalTension); OnPropertyChanged(() => CenterX); OnPropertyChanged(() => CenterY); }