diff --git a/src/scanner/detector/FullWaveformPulseRunnable.cpp b/src/scanner/detector/FullWaveformPulseRunnable.cpp index 78c82b97b..4d0e73fcc 100644 --- a/src/scanner/detector/FullWaveformPulseRunnable.cpp +++ b/src/scanner/detector/FullWaveformPulseRunnable.cpp @@ -308,7 +308,6 @@ void FullWaveformPulseRunnable::handleSubray( intersects.push_back(*intersect); } #if DATA_ANALYTICS >= 2 - // TODO Rethink : At this point, double insertion has happened std::vector &calcIntensityRecord = calcIntensityRecords.back(); calcIntensityRecord[0] = intersect->point.x; diff --git a/src/scene/primitives/Triangle.cpp b/src/scene/primitives/Triangle.cpp index 3eee51b0d..d2e4f4325 100644 --- a/src/scene/primitives/Triangle.cpp +++ b/src/scene/primitives/Triangle.cpp @@ -70,6 +70,7 @@ double Triangle::getIncidenceAngle_rad( ){ double const angle = glm::angle(faceNormal, rayDir); return (angle > PI_HALF) ? M_PI - angle : angle; // Return min. angle + // If (PI_HALF - min. angle), then 0 rad does no longer mean orthogonal } // These naive methods are much faster than the built-in in Vector3D diff --git a/src/util/ArgumentsParser.cpp b/src/util/ArgumentsParser.cpp index 7a204a8bd..04e880d4e 100644 --- a/src/util/ArgumentsParser.cpp +++ b/src/util/ArgumentsParser.cpp @@ -1,6 +1,7 @@ #include #include +#include // *** PUBLIC METHODS *** // // ********************** // @@ -236,8 +237,24 @@ bool ArgumentsParser::parseLegacyEnergyModel(){ // *** PRIVATE METHODS *** // // *********************** // int ArgumentsParser::findIndexOfArgument(std::string&& arg){ + // Get lower case arg + std::string argLow(arg); + std::transform(arg.begin(), arg.end(), argLow.begin(), + [](unsigned char c) { + return std::tolower(c); + } + ); + // Compare arg against each argvi in argv for(int i = 1 ; i < argc ; i++){ - if(arg == argv[i]) return i; + // Get lower case argvi + std::string argvi(argv[i]); + std::transform(argvi.begin(), argvi.end(), argvi.begin(), + [](unsigned char c){ + return std::tolower(c); + } + ); + // Compare lower case strings + if(argLow == argvi) return i; } return -1; }