Skip to content

Instantly share code, notes, and snippets.

@kodawah
Last active November 17, 2016 17:47
Show Gist options
  • Save kodawah/9389e55ef839fc7aa12fc8330a14bb92 to your computer and use it in GitHub Desktop.
Save kodawah/9389e55ef839fc7aa12fc8330a14bb92 to your computer and use it in GitHub Desktop.
/**
* @name Initial orientation
* @{
* There fields describe additional rotations applied to the sphere after
* the video frame is mapped onto it. The sphere is rotated around the
* viewer, who remains stationary.
*
* A positive yaw moves the left half of the frame forward.
* A positive pitch moves the bottom half of the frame upward.
* A positive roll moves the left half of the frame downward.
* These values are exported as 16.16 fixed point.
*
* See this equirectangular projection as example:
*
* @code{.unparsed}
* Yaw
* -180 0 180
* 90 +-------------+-------------+ 180
* | | | z| => up
* P | | | |
* i | ^ | 0|____ => right
* t 0 +-------------X-------------+ 0 Roll / x
* c | | | y/
* h | | | => forward
* | | |
* -90 +-------------+-------------+ -180
*
* X - the default camera center
* ^ - the default up vector
* @endcode
*
* The order of transformation is always yaw, followed by pitch, and
* finally by roll.
*/
int32_t yaw; ///< Rotation around the up vector [-180, 180].
int32_t pitch; ///< Rotation around the right vector [-90, 90].
int32_t roll; ///< Rotation around the forward vector [-180, 180].
/**
* @}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment