summaryrefslogtreecommitdiff
path: root/lib/geometricPlane.cpp
blob: cb52997688d2de45ba264df4545bceebed861680 (plain)
1
2
3
4
5
6
7
8
9
#include "geometricPlane.h"
#include <glm/geometric.hpp>

GeometricPlane::PlaneRelation
GeometricPlane::getRelation(glm::vec3 p) const
{
	const auto d = glm::dot(normal, p - origin);
	return d < 0.f ? PlaneRelation::Below : d > 0.f ? PlaneRelation::Above : PlaneRelation::On;
}