geom/ray: ensure direction is normalised after transform

This commit is contained in:
Danny Robson 2018-04-16 15:56:52 +10:00
parent 4dcd10243c
commit 63fb76c24c

View File

@ -50,7 +50,9 @@ util::geom::operator* (util::matrix4f lhs, ray3f rhs)
{
return {
(lhs * rhs.origin.homog<4> ()).redim<3> (),
(lhs * rhs.direction.homog<4> ()).redim<3> ()
normalised (
(lhs * rhs.direction.homog<4> ()).redim<3> ()
)
};
}