1 #ifndef TIL_AFFINETOOLS_H 2 #define TIL_AFFINETOOLS_H 17 template <
typename T >
20 assert(all_greater_equal(
size(from), 128*std::numeric_limits<T>::epsilon()));
38 template <
typename T1,
typename T2 >
52 template <
typename T >
55 for (
int i = 0; i < 3; ++i)
57 for (
int j = 0; j < 3; ++j)
61 std::cout << a.
getTransl()[i] << std::endl;
void computeAffineTransformBetween(const Box< T, 3 > &from, const Box< T, 3 > &to, Affine< T > &a)
Compute the affine transform that would send a Box on another Box.
A affine mathematical object.
INLINE void apply(const Affine< T1 > &a, const numeric_array< T2, 3 > &in, numeric_array< typename combine< T1, T2 >::type, 3 > &out)
void print(const Affine< T > &a)
Belongs to package Box Do not include directly, include til/Box.h instead.
const Matrix3< T > & getMatrix() const
numeric_array< T, D > size(const Box< T, D > &box)
Return the size of a box.
const numeric_array< T, D > & min_bounds() const
Get min bounds.
const numeric_array< T, 3 > & getTransl() const
type_if<(!std::numeric_limits< T1 >::is_integer &&std::numeric_limits< T2 >::is_integer)||((!std::numeric_limits< T1 >::is_integer||std::numeric_limits< T2 >::is_integer) &&(sizeof(T1) >=sizeof(T2))), T1, T2 >::type type
A 3D box parallel to canonical axes.