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
|
||||
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; }
|
||||
|
|
Loading…
Reference in a new issue