Add homogeneous matrix to affine/linear matrix conversion

This commit is contained in:
Nikita Lisitsa 2021-12-25 14:19:34 +03:00
parent 9a50990c5c
commit f9e6a6e37e

View file

@ -62,4 +62,16 @@ namespace psemek::geom
return result;
}
template <typename T, std::size_t D>
matrix<T, D-1, D-1> homogeneous_to_linear(matrix<T, D, D> const & m)
{
return submatrix<0, 0, D-1, D-1>(m);
}
template <typename T, std::size_t D>
matrix<T, D-1, D> homogeneous_to_affine(matrix<T, D, D> const & m)
{
return submatrix<0, 0, D-1, D>(m);
}
}