summaryrefslogtreecommitdiffstats
path: root/kue/billiard.h
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-08-07 19:13:02 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-08-07 19:23:24 +0300
commit04b5a62b8d9f5ff8240f25361046f2a5d58e8262 (patch)
tree98b126454cdf68d544e138d7e8b31d5fd45b72c2 /kue/billiard.h
parent83ba00b7e569587d50383ff06a70148042ca780e (diff)
downloadtdegames-04b5a62b8d9f5ff8240f25361046f2a5d58e8262.tar.gz
tdegames-04b5a62b8d9f5ff8240f25361046f2a5d58e8262.zip
Add Kue billiards gamefeat/kue
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kue/billiard.h')
-rw-r--r--kue/billiard.h33
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