Agora nao eh mais uma bola o player, eh um par de pernas.
[Projeto-PCG.git] / geometry.h
blob461480e84f44858ebc3c6628c48f1bcec79b3f0a
1 #ifndef GEOMETRIA_H
2 #define GEOMETRIA_H
3 #include "SDL/SDL.h"
4 #include "SDL/SDL_opengl.h"
6 struct Ponto {
7 double x,y;
8 Ponto () { }
9 Ponto (double x1, double y1) {x = x1; y = y1;}
12 struct Vetor {
13 double x,y;
16 class Linha {
17 public:
18 Ponto vertices[2];
20 void desenha();
21 Linha(double x1,double y1,double x2, double y2);
22 Linha(Ponto a, Ponto b) {vertices[0] = a; vertices[1] = b;}
25 class Rect {
26 private:
27 void normaliza();
28 public:
29 Ponto vertices[2];
30 Rect(double x1,double y1,double x2, double y2);
31 Rect(Ponto a, Ponto b) {vertices[0] = a; vertices[1] = b; normaliza();}
34 void drawCircle(double radius, int lines);
36 #endif