/* Auteur: Nicolas JANEY */ /* nicolas.janey@univ-fcomte.fr */ /* Avril 2004 */ /* Fonction de calcul de lancer de rayons */ #ifndef LANCERDERAYONSFONCTIONS #define LANCERDERAYONSFONCTIONS #include "ModuleMatriceVecteurDouble.h" enum { cube, sphere }; struct couleur { float r; float v; float b; float a; }; struct materiel { struct couleur *diffuse ; struct couleur *ambient ; int r; struct couleur *specular ; struct couleur *emission ; int t; struct couleur *transparence ; float shininess ; double indice ; int damier ; float carreau ; }; struct rayon { vecteur o ; vecteur d ; }; struct objet { int type ; double tx,ty,tz ; double a,ax,ay,az ; double rx,ry,rz ; struct materiel *m ; matrice mp ; matrice mpp ; matrice mpi ; vecteur ori ; vecteur dir ; vecteur p ; vecteur norm ; rayon rt ; int vrt ; rayon rr ; }; struct lumiere { vecteur pos ; float e; struct couleur *coul ; }; struct scene { int nobj ; struct objet *obj ; int nlum ; struct lumiere *lum ; double vang ; double cmin ; double cmax ; int tx ; int ty ; }; extern double sensibilite; extern float fact; unsigned char *initialisationsCalculImageLancerDeRayon(scene *sc,int width2,int height2); void initialisationsCalculLancerDeRayon(scene *sc); void calculImageLancerDeRayon(scene *sc,int j,int w,int h,unsigned char *im); #endif