diff options
Diffstat (limited to 'kue/billiard.h')
-rw-r--r-- | kue/billiard.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/kue/billiard.h b/kue/billiard.h new file mode 100644 index 00000000..ea345201 --- /dev/null +++ b/kue/billiard.h @@ -0,0 +1,33 @@ +#ifndef _BILLIARD_H +#define _BILLIARD_H + +#include <tqstring.h> +#include "texture.h" +#include "vector.h" +#include "circle.h" + +class KueBilliard : public circle +{ + public: + KueBilliard(double x, double y, double r, const KueTexture &texure = KueTexture::null()); + ~KueBilliard(); + + void step(double seconds); + + bool isStopped(); + void reflect(double normal); + void collide(KueBilliard &other_billiard); + + vector& velocity(); + void setVelocity(const vector &velocity); + + KueTexture& texture(); + void setTexture(const KueTexture &); + + protected: + KueTexture _texture; + + vector _velocity; +}; + +#endif |