I have a unit vector (direction) which represent a rotation around Y axis,
and would like to turn this into a quaternion to represent the same rotation.
I use GLM library, but interested any library agnostic solution.
Should I pack the direction vector to a matrix then convert to quaternion? Is there a better way?
UPDATE: As I said the matrix solution works already, but there must be a shorter way, as i don't need all dimension only one (around Y):
glm::quat q = glm::conjugate(glm::toQuat( glm::lookAt(glm::vec3(from.getX(), from.getY(), from.getZ()), glm::vec3(from.getX(), from.getY(), from.getZ()) + direction, glm::vec3(0, 1, 0) ) ));