Template Function Sophus::rotationFromNormal

Function Documentation

template<class T>
Matrix3<T> Sophus::rotationFromNormal(Vector3<T> const &normal_foo, Vector3<T> xDirHint_foo = Vector3<T>(T(1), T(0), T(0)), Vector3<T> yDirHint_foo = Vector3<T>(T(0), T(1), T(0)))

Takes in plane normal in reference frame foo and constructs a corresponding rotation matrix R_foo_plane.

Note: The plane frame is defined as such that the normal points along the positive z-axis. One can specify hints for the x-axis and y-axis of the plane frame.

Preconditions:

  • normal_foo, xDirHint_foo, yDirHint_foo must not be close to zero.

  • xDirHint_foo and yDirHint_foo must be approx. perpendicular.