SLAMflex SE  0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
planar_complex.hh
Go to the documentation of this file.
1 namespace TooN{
2  namespace Internal{
3 
10  template<class Precision> struct PointerToPlanarComplex;
11  template<class Precision> struct PointerToPlanarComplex<std::complex<Precision> >
12  {
13  const Precision* const re;
14  const Precision* const im;
15 
16  PointerToPlanarComplex(std::pair<Precision*, Precision*> d)
17  :re(d.first),im(d.second)
18  {}
19 
20  PointerToPlanarComplex(std::pair<const Precision*, const Precision*> d)
21  :re(d.first),im(d.second)
22  {}
23 
25  {
26  return PointerToPlanarComplex<std::complex<Precision> >(std::make_pair(re+i, im+i));
27  }
28 
29  const std::complex<Precision> operator[](int i) const
30  {
31  return std::complex<Precision>(re[i], im[i]);
32  }
33 
34  };
35  }
36 
37 
39  {
40  template<int Size, typename Precision>
41  struct VLayout;
42 
43  template<int Size, typename Precision>
44  struct VLayout<Size, std::complex<Precision> >:
45  public Internal::GenericVBase<Size, std::complex<Precision>, 1, Internal::VectorSlice<Size, std::complex<Precision>, Internal::PointerToPlanarComplex<std::complex<double> >,
46  Internal::PointerToPlanarComplex<std::complex<double> >,
47  const std::complex<double>,
48  const std::complex<double> > >
49  {
50  VLayout(Internal::PointerToPlanarComplex<std::complex<Precision> > p, int sz=0)
51  :Internal::GenericVBase<Size, std::complex<Precision>, 1, Internal::VectorSlice<Size, std::complex<Precision>, Internal::PointerToPlanarComplex<std::complex<double> >,
52  Internal::PointerToPlanarComplex<std::complex<double> >,
53  const std::complex<double>,
54  const std::complex<double> > >(p, sz, 1)
55  {}
56 
57 
58  };
59 
60  };
61 }
62 
const std::complex< Precision > operator[](int i) const
Everything lives inside this namespace.
Definition: allocator.hh:48
VLayout(Internal::PointerToPlanarComplex< std::complex< Precision > > p, int sz=0)
PointerToPlanarComplex(std::pair< const Precision *, const Precision * > d)
PointerToPlanarComplex(std::pair< Precision *, Precision * > d)
PointerToPlanarComplex< std::complex< Precision > > operator+(int i) const