public BezierLine Decode() { BezierLine Bez = BezierLine.Instance; Bez.LineId = 0; Bez.Path.Clear(); Bez.CtrlPts.Clear(); if (Path != null) //in case we are loading a blank track { foreach (BezCtrlPtSerial BCPS in CtrlPts) { BezCtrlPt BCP = BCPS.Decode(); Bez.CtrlPts.Add(BCP); } foreach (Vector3Serial PS in Path) { Bez.Path.Add(PS.V3); } } else { Bez.Init(); } //blank track - put in the 2 dummies return(Bez); }
void Reset() { Rd.Sectns.Clear(); Rd.Segments.Clear(); Rd.XSecs.Clear(); Bez.Path.Clear(); Bez.CtrlPts.Clear(); Bez.Init(); Rd.Init(); }