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 // Forward declaration
class Primitive; class Primitive;
struct Ray { struct Ray
{
friend class Scene; friend class Scene;
// Components // Components
@ -23,10 +24,12 @@ struct Ray {
Vector3d bitangent; Vector3d bitangent;
// Constructor // 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; ++rayCount;
} }
inline void setRemainingBounces(int remainingBounces) { this->remainingBounces = remainingBounces; }
inline int getRemainingBounces() const { return remainingBounces; } inline int getRemainingBounces() const { return remainingBounces; }
static inline void resetRayCount() { rayCount = 0; } static inline void resetRayCount() { rayCount = 0; }