private List <ProjectileMotionPoint> GetListAllPointsOfTrajectory() { if (!ListAllPointsOfTrajectory.Any()) { ProjectileMotionWithResistanceComputation computation = ProjectileMotionWithResistanceComputation.Start(Settings); ListAllPointsOfTrajectory.Add(computation.Point); while (computation.IsNextReal) { ListAllPointsOfTrajectory.Add(computation.Continue().Point); } } return(ListAllPointsOfTrajectory); }
internal ProjectileMotionPoint(ProjectileMotionWithResistanceComputation prevComputation) { Settings = new ProjectileMotionSettings(prevComputation.Settings.Quantities); X = new Length(prevComputation.Point.X.GetBasicVal() + prevComputation.Point.Vx.GetBasicVal() * ProjectileMotionWithResistanceComputation.Dt, UnitLength.Basic); Y = new Length(prevComputation.GetNewY() < 0 ? 0 : prevComputation.GetNewY(), UnitLength.Basic); T = new Time(prevComputation.Point.T.GetBasicVal() + ProjectileMotionWithResistanceComputation.Dt, UnitTime.Basic); Vx = new Velocity(Math.Abs(prevComputation.GetNewVx()), UnitVelocity.Basic); Vy = new Velocity(Math.Abs(prevComputation.GetNewVy()), UnitVelocity.Basic); WasHighest = prevComputation.Point.WasHighest; if (Y < prevComputation.Point.Y && !prevComputation.Point.WasHighest) { prevComputation.Point.IsHighest = true; prevComputation.Point.Vy = new Velocity(0, UnitVelocity.Basic); WasHighest = true; } InResultUnits(); }