HeadToVideoRot.m 300 B

12345678910
  1. % HeadToVideoRot.m
  2. %
  3. % Calculates the rotation of the head vector to the provided video vector.
  4. function [rot] = HeadToVideoRot(headVec, headAngleRads, videoVec)
  5. headToRef = YZXrotation(headVec, -headAngleRads);
  6. videoToRef = YZXrotation(videoVec, 0);
  7. rot = videoToRef*(headToRef');
  8. end