Minor changes.

This commit is contained in:
2017-03-28 14:22:39 -04:00
parent 9d1f3d86d8
commit caad394cfa
2 changed files with 17 additions and 5 deletions

View File

@@ -288,8 +288,13 @@ void PhotonTracer::photon_tracing(Scene * s, const size_t n_photons_per_ligth, c
void PhotonTracer::build_photon_map(const char * photons_file, const bool caustics) {
Photon ph;
float x, y, z, dx, dy, dz, r, g, b, rc;
ifstream ifs(photons_file, ios::in);
ifstream ifs;
if (photons_file == NULL)
return;
ifs.open(photons_file);
if (!ifs.is_open()) {
cerr << "Failed to open the file " << photons_file << " for reading." << endl;
exit(EXIT_FAILURE);