4 #include "SDL/SDL_opengl.h"
7 const double PI
= 3.14159265358979323846;
12 Ponto (double x1
, double y1
) {x
= x1
; y
= y1
;}
15 double distance(const Ponto
&a
,const Ponto
&b
);
17 double operator*(const Ponto
&a
, const Ponto
&b
);
18 Ponto
operator-(const Ponto
&a
, const Ponto
&b
);
19 Ponto
operator+(const Ponto
&a
, const Ponto
&b
);
30 Linha(double x1
,double y1
,double x2
, double y2
);
31 Linha(Ponto a
, Ponto b
) {vertices
[0] = a
; vertices
[1] = b
;}
39 Rect(double x1
,double y1
,double x2
, double y2
);
40 Rect(Ponto a
, Ponto b
) {vertices
[0] = a
; vertices
[1] = b
; normaliza();}
45 std::vector
<Linha
> linhas
;
46 void addLinha(Linha linha
) {linhas
.push_back(linha
);}
50 void drawCircle(double radius
, int lines
);
51 bool linesIntersect(const Linha a
,const Linha b
);