20   return R_foo_line.matrix().col(1);
 
   31                 normal_foo.transpose());
 
   32   normal_foo.normalize();
 
   33   return SO2<T>(normal_foo.y(), -normal_foo.x());
 
   42   return R_foo_plane.matrix().col(2);
 
   64                 "xDirHint (%) and yDirHint (%) must be perpendicular.",
 
   65                 xDirHint_foo.transpose(), yDirHint_foo.transpose());
 
   68   T 
const xDirHint_foo_sqr_length = xDirHint_foo.squaredNorm();
 
   69   T 
const yDirHint_foo_sqr_length = yDirHint_foo.squaredNorm();
 
   70   T 
const normal_foo_sqr_length = normal_foo.squaredNorm();
 
   72                 xDirHint_foo.transpose());
 
   74                 yDirHint_foo.transpose());
 
   76                 normal_foo.transpose());
 
   79   basis_foo.col(2) = normal_foo;
 
   82     xDirHint_foo.normalize();
 
   85     yDirHint_foo.normalize();
 
   88     basis_foo.col(2).normalize();
 
   91   T abs_x_dot_z = abs(basis_foo.col(2).dot(xDirHint_foo));
 
   92   T abs_y_dot_z = abs(basis_foo.col(2).dot(yDirHint_foo));
 
   93   if (abs_x_dot_z < abs_y_dot_z) {
 
   95     basis_foo.col(1) = basis_foo.col(2).cross(xDirHint_foo).normalized();
 
   96     basis_foo.col(0) = basis_foo.col(1).cross(basis_foo.col(2));
 
   99     basis_foo.col(0) = yDirHint_foo.cross(basis_foo.col(2)).normalized();
 
  100     basis_foo.col(1) = basis_foo.col(2).cross(basis_foo.col(0));
 
  102   T det = basis_foo.determinant();
 
  105                 "Determinant of basis is not 1, but %. Basis is \n%\n", det,
 
  136   T 
const d = line_foo.offset();
 
  139   return SE2<T>(R_foo_plane, -d * n);
 
  158   T 
const d = plane_foo.offset();
 
  161   return SE3<T>(R_foo_plane, -d * n);
 
  167 template <
class T, 
int N>
 
  169     Eigen::Hyperplane<T, N> 
const& plane) {
 
  170   if (plane.offset() >= 0) {
 
  174   return Eigen::Hyperplane<T, N>(-plane.normal(), -plane.offset());
 
  179 #endif  // GEOMETRY_HPP