summaryrefslogtreecommitdiffhomepage
path: root/cv/affine.hpp
blob: 4640e24e2aef2f607f0ac9e44d88267e6123b7f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright (c) 2012 Patrick Ruoff
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 */

#pragma once

#include "numeric.hpp"

namespace affine_impl {

using namespace numeric_types;

class Affine final
{
public:
    Affine();
    Affine(const mat33& R, const vec3& t);

    mat33 R { mat33::eye() };
    vec3 t { 0, 0, 0 };
};

Affine operator*(const Affine& X, const Affine& Y);
Affine operator*(const mat33& X, const Affine& Y);
Affine operator*(const Affine& X, const mat33& Y);
vec3 operator*(const Affine& X, const vec3& v);

} // ns affine_impl

using Affine = affine_impl::Affine;
//using affine_impl::operator *;