Permalink
Browse files

correction of Noff2Pbrt.cpp

  • Loading branch information...
richard63 committed Jun 26, 2012
1 parent 96c0c36 commit 19b23c9c6a2ca4c1dd61ecb59c79210216c03680
Showing with 1 addition and 1 deletion.
  1. +1 −1 radiativeTransfer/tools/Noff2Pbrt.cpp
@@ -274,7 +274,7 @@ void ecritFichierPhoton(string fichierPhoton, string fichierGeomPbrt){
fichierSortiePhoton << "#ligth source : to change the direction of the source change point from and point to, only the direction is important \nWorldBegin\n \nAttributeBegin\nLightSource \"distant\" \"point from\" [0 0 50] \"point to\" [0 0 0]\nAttributeEnd\n\n";
//pour dupliquer l'echantillon et prendre en compte la profondeur
- fichierSortiePhoton << "#to duplicate the sample and take care of the depth, we create a cube wich will surround the sample\n\nAttributeBegin\nMaterial \"glass\"\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 256.001 256 0 256.001 0 256 256.001]\n\"normal N\" [0 0 1 0 0 1 0 0 1]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [256 0 256.001 0 256 256.001 256 256 256.001]\n\"normal N\" [0 0 1 0 0 1 0 0 1]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 0 " << (maxX-minX)/facteur <<" 0 0 0 " << (maxY-minY)/facteur << " 0]\n\"normal N\" [0 0 -1 0 0 -1 0 0 -1]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [" << (maxX-minX)/facteur <<" 0 0 0 " << (maxY-minY)/facteur <<" 0 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0]\n\"normal N\" [0 0 -1 0 0 -1 0 0 -1]\n\nShape \"trianglemesh\" \"integer indices\" [0 2 1]\n\"point P\" [0 0 0 " << (maxX-minX)/facteur <<" 0 0 0 0 256]\n\"normal N\" [0 -1 0 0 -1 0 0 -1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 2 1]\n\"point P\" [" << (maxX-minX)/facteur <<" 0 0 0 0 256 " << (maxX-minX)/facteur <<" 0 256]\n\"normal N\" [0 -1 0 0 -1 0 0 -1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 " << (maxY-minY)/facteur <<" 0 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0 0 " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [0 1 0 0 1 0 0 1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 2 1]\n\"point P\" [" << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0 0 " << (maxY-minY)/facteur <<" 256 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [0 1 0 0 1 0 0 1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [" << (maxX-minX)/facteur <<" 0 256 " << (maxX-minX)/facteur <<" 0 0 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0]\n\"normal N\" [1 0 0 1 0 0 1 0 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [" << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0 " << (maxX-minX)/facteur <<" 0 256 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [1 0 0 1 0 0 1 0 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 0 0 0 256 0 " << (maxY-minY)/facteur <<" 0]\n\"normal N\" [-1 0 0 -1 0 0 -1 0 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 256 0 " << (maxY-minY)/facteur <<" 0 0 " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [-1 0 0 -1 0 0 -1 0 0]\n\nAttributeEnd\n";
+ fichierSortiePhoton << "#to duplicate the sample and take care of the depth, we create a cube wich will surround the sample\n\nAttributeBegin\nMaterial \"glass\"\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 256.001 " << (maxX-minX)/facteur << " 0 256.001 0 " << (maxY-minY)/facteur << " 256.001]\n\"normal N\" [0 0 1 0 0 1 0 0 1]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [ "<< (maxX-minX)/facteur<< " 0 256.001 0 "<<(maxY-minY)/facteur<< " 256.001 "<<(maxX-minX)/facteur<< " "<<(maxY-minY)/facteur<< " 256.001]\n\"normal N\" [0 0 1 0 0 1 0 0 1]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 0 " << (maxX-minX)/facteur <<" 0 0 0 " << (maxY-minY)/facteur << " 0]\n\"normal N\" [0 0 -1 0 0 -1 0 0 -1]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [" << (maxX-minX)/facteur <<" 0 0 0 " << (maxY-minY)/facteur <<" 0 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0]\n\"normal N\" [0 0 -1 0 0 -1 0 0 -1]\n\nShape \"trianglemesh\" \"integer indices\" [0 2 1]\n\"point P\" [0 0 0 " << (maxX-minX)/facteur <<" 0 0 0 0 256]\n\"normal N\" [0 -1 0 0 -1 0 0 -1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 2 1]\n\"point P\" [" << (maxX-minX)/facteur <<" 0 0 0 0 256 " << (maxX-minX)/facteur <<" 0 256]\n\"normal N\" [0 -1 0 0 -1 0 0 -1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 " << (maxY-minY)/facteur <<" 0 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0 0 " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [0 1 0 0 1 0 0 1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 2 1]\n\"point P\" [" << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0 0 " << (maxY-minY)/facteur <<" 256 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [0 1 0 0 1 0 0 1 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [" << (maxX-minX)/facteur <<" 0 256 " << (maxX-minX)/facteur <<" 0 0 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0]\n\"normal N\" [1 0 0 1 0 0 1 0 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [" << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 0 " << (maxX-minX)/facteur <<" 0 256 " << (maxX-minX)/facteur <<" " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [1 0 0 1 0 0 1 0 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 0 0 0 256 0 " << (maxY-minY)/facteur <<" 0]\n\"normal N\" [-1 0 0 -1 0 0 -1 0 0]\n\nShape \"trianglemesh\" \"integer indices\" [0 1 2]\n\"point P\" [0 0 256 0 " << (maxY-minY)/facteur <<" 0 0 " << (maxY-minY)/facteur <<" 256]\n\"normal N\" [-1 0 0 -1 0 0 -1 0 0]\n\nAttributeEnd\n";
//on inclut le fichier de geometrie
fichierSortiePhoton <<"\n#path to the geometry file \nAttributeBegin\nMaterial \"glass\"\nScale "<<(double)256/(maxZ-minZ)<< " " << (double)256/(maxZ - minZ)<<" " << (double)256/(maxZ-minZ)<<"\nTranslate " <<-minX << " " << -minY <<" " << -minZ <<"\nInclude \""<< fichierGeomPbrt <<"\"\nAttributeEnd\n\nWorldEnd";

0 comments on commit 19b23c9

Please sign in to comment.