Commit 8e27f324 authored by axel's avatar axel

--no commit message

--no commit message
parent 880ff9d3
......@@ -38,7 +38,7 @@ int main(int argc, char** argv)
{
FILE *file;
/*Creation d'une sphere : entite A (sphere rouge)*/
/*Creation d'une sphere : entite A*/
LrMatrix mat_A=LrMatrix::translate(LrVector(-1, 15, 0)) * LrMatrix::scale(3);
LrGeometrySphere geo_A;
LrColor c_bois1((uint8_t)140,(uint8_t)73,(uint8_t)15);
......@@ -50,7 +50,7 @@ int main(int argc, char** argv)
//LrOpticBasic opt_A(0,1,0,&pcb_A,&pnb_A);
LrEntityElementary sphere_A(mat_A, &geo_A, &opt_A);
/*Creation d'une sphere : entite B (sphere verte)*/
/*Creation d'une sphere : entite B*/
LrMatrix mat_B = LrMatrix::translate(LrVector(10, 25, 5)) * LrMatrix::scale(2);
LrColor c_1((uint8_t)175,(uint8_t)17,(uint8_t)17);
LrColor c_2((uint8_t)0,(uint8_t)100,(uint8_t)100);
......@@ -60,7 +60,7 @@ int main(int argc, char** argv)
LrOpticPhong opt_B(0.5, 0.5, 0, &pcb_B, &pnb_B, 50);
LrEntityElementary sphere_B(mat_B, &geo_A, &opt_B);
/*Creation d'une sphere : entite B (sphere du milieu)*/
/*Creation d'une sphere : entite B*/
LrMatrix mat_C = LrMatrix::translate(LrVector(-10, 15, -3)) * LrMatrix::scale(3);
LrPertColorTextProcMarbre pcb_C(LrColor::BLACK, LrColor::WHITE, LrColor::GREY, 1, 4);
LrPertNormalBasic pnb_C;
......@@ -82,23 +82,26 @@ int main(int argc, char** argv)
LrVector normale(0, 0, 1);
LrGeometryPlan geo_E(normale);
LrPertColorTextProcDamier pcb_E(LrColor::WHITE, LrColor::BLACK, 1.0f);
LrPertNormalBasic pnb_E;
LrOpticPhong opt_E(0.7, 0.3, 0, &pcb_E, &pnb_E, 25);
LrEntityElementary plan_E(mat_E, &geo_E, &opt_E);
//Creation d'une lumiere point : entite X (lumiere de droite)
LrMatrix mat_lum_X = LrMatrix::translate(LrVector(-5, -8, 5));
//LrEntityLightPoint lum_X(mat_lum_X, LrColor(0.8f,0.8f,0.8f));
LrEntityLightPlane lum_X(mat_lum_X, LrColor(0.6f,0.6f,0.6f),10);
LrEntityLightPoint lum_X(mat_lum_X, LrColor(0.8f,0.8f,0.8f));
//LrEntityLightPlane lum_X(mat_lum_X, LrColor(0.6f,0.6f,0.6f),10);
//Creation d'une lumiere point : entite Y (Lumiere au plafond)
LrMatrix mat_lum_Y = LrMatrix::translate(LrVector(0, 0, 20));
LrEntityLightPlane lum_Y(mat_lum_Y, LrColor(0.6f,0.6f,0.6f),10);
LrEntityLightPoint lum_Y(mat_lum_Y, LrColor(0.6f,0.6f,0.6f));
//LrEntityLightPlane lum_Y(mat_lum_Y, LrColor(0.6f,0.6f,0.6f),10);
//Creation d'une lumiere point : entite Z (Lumiere de gauche)
LrMatrix mat_lum_Z = LrMatrix::translate(LrVector(5, 0, 5));
//LrEntityLightPoint lum_Z(mat_lum_Z, LrColor(0.8f,0.8f,0.8f));
LrEntityLightPlane lum_Z(mat_lum_Z, LrColor(0.6f,0.6f,0.6f),10);
LrEntityLightPoint lum_Z(mat_lum_Z, LrColor(0.8f,0.8f,0.8f));
//LrEntityLightPlane lum_Z(mat_lum_Z, LrColor(0.6f,0.6f,0.6f),10);
//Creation de la Liste des entites-lumieres et ajout des entites-lumieres dans cette liste
LrScene::LrEntityList list_lights;
......@@ -108,7 +111,6 @@ int main(int argc, char** argv)
list_lights.push_back(&lum_X);
//Creation de la Liste des entites et ajout des entites dans cette liste
LrScene::LrEntityList list_entities;
list_entities.push_back(&sphere_A);
......@@ -127,18 +129,18 @@ int main(int argc, char** argv)
//L'antiAliasing
//LrAntiAliasingCentre aa(1);
LrAntiAliasingCentre aa(1);
//LrAntiAliasingRandom aa(1);
//LrAntiAliasingCentre aa(2);
//LrAntiAliasingRandom aa(2);
//LrAntiAliasingCentre aa(4);
LrAntiAliasingRandom aa(4);
//LrAntiAliasingRandom aa(4);
//La scene avec 5 rebonds
LrSceneRayTracing scene_A(list_entities, list_lights,&bind_A, &img_A, &cam_A, &aa, 15);
LrSceneRayTracing scene_A(list_entities, list_lights,&bind_A, &img_A, &cam_A, &aa, 10);
cout<<"RayTracing Start..."<< endl;
//Lancement de l'algorithme de lancer de rayons (parametre : nb de threads)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment