summaryrefslogtreecommitdiffstats
path: root/kue/billiard.h
blob: ea3452013c76a2d2370be4701ebb5dd2ddef53c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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