Adds basic bounce count edit function

This commit is contained in:
Maximilian Giller 2022-11-17 17:22:37 +01:00
parent 8fd79c04ab
commit 6674549b18

View file

@ -9,7 +9,8 @@
// Forward declaration
class Primitive;
struct Ray {
struct Ray
{
friend class Scene;
// Components
@ -23,10 +24,12 @@ struct Ray {
Vector3d bitangent;
// Constructor
Ray(Vector3d const &origin = Vector3d(0, 0, 0), Vector3d const &direction = Vector3d(0, 0, 1)) : origin(origin), direction(normalized(direction)) {
Ray(Vector3d const &origin = Vector3d(0, 0, 0), Vector3d const &direction = Vector3d(0, 0, 1)) : origin(origin), direction(normalized(direction))
{
++rayCount;
}
inline void setRemainingBounces(int remainingBounces) { this->remainingBounces = remainingBounces; }
inline int getRemainingBounces() const { return remainingBounces; }
static inline void resetRayCount() { rayCount = 0; }