Skip to content
Snippets Groups Projects
Commit 69706300 authored by Yoel's avatar Yoel
Browse files

CamObs cleanup

parent c22db6d9
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,12 @@
#include <limits>
namespace cam {
cam::CamObs::CamObs(const util::Mat4& mat, float theta, int width, int height)
CamObs::CamObs(const util::Mat4& mat, float theta, int width, int height)
: mat(mat), theta(theta), width(width), height(height) {
}
Ray cam::CamObs::create(float x, float y) const {
// Create a new ray shooting from the camera
Ray CamObs::create(float x, float y) const {
util::Vec3 d(x - width / 2, height / 2 - y,
-(width / 2) / (tan(theta / 2)));
......
......@@ -6,11 +6,10 @@
namespace cam {
class CamObs {
public:
// Constructor
CamObs(const util::Mat4& mat, float theta, int width, int height);
// Methods
Ray create(float x, float y) const;
// Attributes
const int width, height;
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment