Adds basic bounce count edit function
This commit is contained in:
parent
8fd79c04ab
commit
6674549b18
1 changed files with 5 additions and 2 deletions
|
@ -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; }
|
||||||
|
|
Loading…
Reference in a new issue