lcd accelerometer
physics.h@0:a0e65c86809d, 2017-10-31 (annotated)
- Committer:
- jakebonney10
- Date:
- Tue Oct 31 14:31:13 2017 +0000
- Revision:
- 0:a0e65c86809d
tried using set_state finction
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jakebonney10 | 0:a0e65c86809d | 1 | // Library for accelerometer Assignment4 OCE360 |
jakebonney10 | 0:a0e65c86809d | 2 | // Written by Jake Bonney |
jakebonney10 | 0:a0e65c86809d | 3 | |
jakebonney10 | 0:a0e65c86809d | 4 | //class definitions |
jakebonney10 | 0:a0e65c86809d | 5 | class physics_ball |
jakebonney10 | 0:a0e65c86809d | 6 | { |
jakebonney10 | 0:a0e65c86809d | 7 | public: |
jakebonney10 | 0:a0e65c86809d | 8 | physics_ball(); |
jakebonney10 | 0:a0e65c86809d | 9 | float vx; |
jakebonney10 | 0:a0e65c86809d | 10 | float vy; |
jakebonney10 | 0:a0e65c86809d | 11 | int x; |
jakebonney10 | 0:a0e65c86809d | 12 | int y; |
jakebonney10 | 0:a0e65c86809d | 13 | int radius; |
jakebonney10 | 0:a0e65c86809d | 14 | void update(float time_step); |
jakebonney10 | 0:a0e65c86809d | 15 | void define_space(int width, int height); |
jakebonney10 | 0:a0e65c86809d | 16 | void set_param(int radius, int color); |
jakebonney10 | 0:a0e65c86809d | 17 | void set_state(int x, int y, float vx,float vy); |
jakebonney10 | 0:a0e65c86809d | 18 | }; |
jakebonney10 | 0:a0e65c86809d | 19 |