summaryrefslogtreecommitdiff
path: root/lib/ray.hpp
blob: bce4a30eeb5054a1cc93cfa71bdc038adaaf57dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include <glm/glm.hpp>

class Ray {
public:
	Ray(glm::vec3 start, glm::vec3 direction) : start {start}, direction {direction} { }

	glm::vec3 start;
	glm::vec3 direction;

	float distanceToLine(const glm::vec3 & a, const glm::vec3 & b) const;
};