Skip to content
Snippets Groups Projects
Hit.h 616 B
Newer Older
Postea's avatar
Postea committed
#pragma once

#include "../material/Material.h"
Postea's avatar
Postea committed
#include "Ray.h"

namespace cam {
Yoel's avatar
Yoel committed
   public:
	Hit(const util::Vec3& hit, const util::Vec3& n, float t,
	    const std::shared_ptr<material::Material>& material);
Yoel's avatar
Yoel committed
	Ray scattered_ray(const Ray& inc_ray) const;
	util::Vec3 albedo() const;    // TODO TexelPos
	util::Vec3 emission() const;  // TODO TexelPos
Yoel's avatar
Yoel committed
	bool scatter() const;
	util::Vec3 hitpoint() const;
	util::Vec3 normal() const;
	float scalar() const;
Yoel's avatar
Yoel committed
	// Attributes
	// TODO TexelPos
	std::shared_ptr<material::Material> material;

   private:
	util::Vec3 hit, n;
	float t;
Postea's avatar
Postea committed

Yoel's avatar
Yoel committed
}  // namespace cam