public StringForce(Projectile proj, Vector stringPosition, double stringLength, KinematicsEngine engine) : base(proj) { this.stringPosition = stringPosition; this.stringLength = stringLength; this.engine = engine; }
public OscillatingSpringForce(Projectile projectile, double springConstant, Vector origin, double unstretchedLength, Vector amplitude, double frequency, KinematicsEngine engine) : base(projectile, springConstant, unstretchedLength) { this.origin = origin; this.amplitude = amplitude; this.frequency = frequency; this.engine = engine; }
public override bool ShouldContinue(KinematicsEngine engine) { foreach (var proj in engine.Projectiles) { if (proj.Position.Z < 0 || (proj.Position.Z == 0 && engine.Time > 0)) { return(false); } } return(true); }
public GlobalForce(KinematicsEngine engine) { this.engine = engine; }
public UniversalGravitationForce(KinematicsEngine engine) : base(engine) { }
/// <summary> /// A function that detects whether the engine should continue /// </summary> /// <returns>True if the engine should continue running</returns> abstract public bool ShouldContinue(KinematicsEngine engine);
/// <param name="coefficient">The coefficient of air resistance, including drag coefficient, density of air, and cross-sectional area</param> public AirResistanceForce(KinematicsEngine engine, double coefficient) : base(engine) { this.coefficient = coefficient; }
public ConstantGravitationForce(KinematicsEngine engine, Vector fieldStrength) : base(engine) { this.fieldStrength = fieldStrength; }
public StoppingForce(KinematicsEngine engine) : base(engine) { this.engine = engine; }