public Trajectory(Impact impact, Ball ball, Environment environment) { // Provide and impact, a ball, and an environment _impact = impact; _ball = ball; _environment = environment; }
public Trajectory(Impact impact, Environment environment) { // Provide an impact and environment and assume a default ball _impact = impact; _ball = new Ball(); _environment = environment; }
public Trajectory(Impact impact, Ball ball) { // Provide an impact and ball and assume a default environment _impact = impact; _ball = ball; _environment = new Environment(); }
public Trajectory(Impact impact) { // Providing an Impact object and assuming default Ball and Environment _impact = impact; _ball = new Ball(); _environment = new Environment(); }
public Trajectory(double exitVelocity, double launchAngle) { // Just an exit velocity and launch angle, assuming that the direction is not relevant _impact = new Impact(exitVelocity, launchAngle, 0); _ball = new Ball(); _environment = new Environment(); }
// Constructors to have many options for input public Trajectory(double exitVelocity, double launchAngle, double direction) { // Just the impact values _impact = new Impact(exitVelocity, launchAngle, direction); _ball = new Ball(); _environment = new Environment(); }