1 #ifndef __BRAIN_GLUTAUX
2 #define __BRAIN_GLUTAUX
3 
4 
5 float draw3Dtext(char *text,float dx,float dy,float dz,float r,float g,float b);
6 
7 void glutSolidBox(float dx,float dy,float dz);
8 
9 void glutPrint(char *str);
10 void glutPrintxy(float x,float y,char *str);
11 
12 void Normal(double vector1[3],double vector2[3],double resultado[3]);
13 void Normalf(float vector1[3],float vector2[3],float resultado[3]);
14 
15 float ObtainYAngle(Vector *v);
16 
17 void ApplyMatrix(float v[4],float matrix[16],float out[4]);
18 void ApplyMatrix2(float v[4],float matrix[16],float out[4]);
19 void MulMatrix(float m2[16],float m1[16],float out[16]);
20 
21 /* plane is a vector with the coeficients A,B,C,D of the plane equation */
22 /* p and v are a point of the line and the director vector				*/
23 /* crossp is where the collision point is returned						*/
24 bool PlaneLineCollision(float plane[4],float p[3],float v[3],float crossp[3]);
25 
26 bool LineLineCollision(float p0[3],float v0[3],float p1[3],float v1[3],float *l1,float *l2);
27 
28 void DistributeVector(Vector v,Vector v2,Vector *r1,Vector *r2);
29 
30 double determinante_d(double m[9]);
31 float determinante_f(float m[9]);
32 
33 bool kramer_d(double m[9],double c[3],double sol[3]);
34 bool kramer_f(float m[9],float c[3],float sol[3]);
35 
36 bool gauss_solve_d(double *m,double *ctnt,double *s,int neq);
37 
38 double det_d(double *m,int size);
39 
40 double distancia_a_recta(Vector p,Vector pr,Vector vr);
41 
42 unsigned int createTexture(char *fname,int x,int y,int sz);
43 unsigned int createTexture(char *fname);
44 
45 #endif
46