Add template deduction guides for transformation classes
This commit is contained in:
parent
42501ec7c2
commit
957493e2e2
5 changed files with 18 additions and 0 deletions
|
|
@ -34,6 +34,9 @@ namespace psemek::geom
|
||||||
box_type r_;
|
box_type r_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T, std::size_t D>
|
||||||
|
orthographic(box<T, D>) -> orthographic<T, D>;
|
||||||
|
|
||||||
template <typename T, std::size_t D>
|
template <typename T, std::size_t D>
|
||||||
orthographic<T, D>::orthographic()
|
orthographic<T, D>::orthographic()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@ namespace psemek::geom
|
||||||
homogeneous_matrix_type homogeneous_matrix_;
|
homogeneous_matrix_type homogeneous_matrix_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
perspective(T, T, T, T) -> perspective<T, 3>;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
perspective(T, T, T, T, T, T) -> perspective<T, 3>;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
perspective<T, 3>::perspective(scalar_type fov_x, scalar_type fov_y, scalar_type near, scalar_type far)
|
perspective<T, 3>::perspective(scalar_type fov_x, scalar_type fov_y, scalar_type near, scalar_type far)
|
||||||
: homogeneous_matrix_(homogeneous_matrix_type::zero())
|
: homogeneous_matrix_(homogeneous_matrix_type::zero())
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ namespace psemek::geom
|
||||||
void fill_matrix(Matrix & m) const;
|
void fill_matrix(Matrix & m) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
axis_rotation(vector<T, 3>, T) -> axis_rotation<T>;
|
||||||
|
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
plane_rotation<T, N>::plane_rotation()
|
plane_rotation<T, N>::plane_rotation()
|
||||||
: i{0}
|
: i{0}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ namespace psemek::geom
|
||||||
void fill_matrix(Matrix & m) const;
|
void fill_matrix(Matrix & m) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T, std::size_t N>
|
||||||
|
scale(vector<T, N>) -> scale<T, N>;
|
||||||
|
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
scale<T, N>::scale()
|
scale<T, N>::scale()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ namespace psemek::geom
|
||||||
point<T, N> operator()(point<T, N> const & p) const;
|
point<T, N> operator()(point<T, N> const & p) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T, std::size_t N>
|
||||||
|
translation(vector<T, N>) -> translation<T, N>;
|
||||||
|
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
translation<T, N>::translation()
|
translation<T, N>::translation()
|
||||||
: v{vector<T, N>::zero()}
|
: v{vector<T, N>::zero()}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue