template<typename T, unsigned D>
inline LinAl::Vector<T, D> AffineTransformation<T, D>::transform(const LinAl::Vector<T, D> &v) const
{
- return LinAl::Vector<T, D>(matrix*LinAl::Vector<T, D+1>(v, T(1)));
+ return (matrix*compose(v, T(1))).template slice<D>(0);
}
template<typename T, unsigned D>
inline LinAl::Vector<T, D> AffineTransformation<T, D>::transform_linear(const LinAl::Vector<T, D> &v) const
{
- return LinAl::Vector<T, D>(matrix*LinAl::Vector<T, D+1>(v, T(0)));
+ return (matrix*compose(v, T(0))).template slice<D>(0);
}
template<typename T, unsigned D>