Skip to content
Snippets Groups Projects
Ray.h 462 B
Newer Older
Postea's avatar
Postea committed
#pragma once
#include "../tools/Vec3.h"
Postea's avatar
Postea committed

namespace cam {
Yoel's avatar
Yoel committed
   public:
	Ray(const util::Vec3& x0, const util::Vec3& d, float tmin, float tmax,
	    bool normalize);
Yoel's avatar
Yoel committed
	util::Vec3 operator()(float t) const;
	bool in_range(float t) const;
Yoel's avatar
Yoel committed
	friend std::ostream& operator<<(std::ostream& os, const cam::Ray& rhs);
Postea's avatar
Postea committed

Yoel's avatar
Yoel committed
	const util::Vec3 x0;
	util::Vec3 d;
	const float tmin, tmax;
	const bool normalize;
Yoel's avatar
Yoel committed
const float epsilon = pow(10, -4);
Yoel's avatar
Yoel committed
}  // namespace cam