Add homogeneous matrix to affine/linear matrix conversion
This commit is contained in:
parent
9a50990c5c
commit
f9e6a6e37e
1 changed files with 12 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue