mpri-graphics-project/main_ball.cpp

23 lines
397 B
C++
Raw Normal View History

2018-02-12 01:12:31 +01:00
/**
* Test file for the movement of a ball.
**/
#include "Ball.hpp"
#include <cstdio>
#include <iostream>
2018-02-13 17:05:49 +01:00
#include "FlatGround.hpp"
2018-02-12 01:12:31 +01:00
using namespace std;
2018-02-13 12:39:46 +01:00
int main() {
2018-02-12 01:12:31 +01:00
int i;
2018-02-12 18:18:28 +01:00
Point center(0,10,0);
2018-02-13 17:05:49 +01:00
FlatGround* flat = new FlatGround();
Ball ball(center,flat, 0, 0.25, 0, 1, 1);
2018-02-12 10:50:45 +01:00
for(i=0; i< 10000; i++) {
ball.update_pos(0.001);
2018-02-12 01:12:31 +01:00
cout << ball << "\n";
}
}