using quaternions for rotation. There are any references about using quaternions for rotation in here. you can look below.