Exemplo n.º 1
0
 public Trajectory(Impact impact, Ball ball, Environment environment)
 {
     // Provide and impact, a ball, and an environment
     _impact      = impact;
     _ball        = ball;
     _environment = environment;
 }
Exemplo n.º 2
0
 public Trajectory(Impact impact, Environment environment)
 {
     // Provide an impact and environment and assume a default ball
     _impact      = impact;
     _ball        = new Ball();
     _environment = environment;
 }
Exemplo n.º 3
0
 public Trajectory(Impact impact, Ball ball)
 {
     // Provide an impact and ball and assume a default environment
     _impact      = impact;
     _ball        = ball;
     _environment = new Environment();
 }
Exemplo n.º 4
0
        public Trajectory(Impact impact)
        {
            // Providing an Impact object and assuming default Ball and Environment

            _impact      = impact;
            _ball        = new Ball();
            _environment = new Environment();
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
        // 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();
        }