In the branch pathtracing, there are two implementations of ONB::ONB (lines 222–257 in geometry.h), which are essentially the same but accept either a Vec or a Normal.
It would be better to create a constructor that takes the three parameters x, y, and z:
class ONB {
// …
ONB(float x, float y, float x) {
// Put here your implementation of the OBN algorithm
}
// …
};
Thank you for the enhancement suggestion. We fixed the issue as recommended.
Please do not hesitate to report any other bugs or feature requests! We would be pleased...
In the branch
pathtracing
, there are two implementations ofONB::ONB
(lines 222–257 in geometry.h), which are essentially the same but accept either aVec
or aNormal
.It would be better to create a constructor that takes the three parameters
x
,y
, andz
:and then call it from the other two constructors:
In this way you have just one implementation of the algorithm and it is easier to catch bugs.