Function rotate_vec3

Source
pub fn rotate_vec3(q: Quaternionf, v: Vec3) -> Vec3
Expand description

Rotates a vector by an OpenXR quaternion.

The quaternion is assumed normalized and is not validated.

ยงExamples

use ailloli_ui_openxr::math::Vec3;
use ailloli_ui_openxr::openxr_runtime::panel::rotate_vec3;
assert_eq!(rotate_vec3(openxr::Posef::IDENTITY.orientation, Vec3::new(1.0, 2.0, 3.0)), Vec3::new(1.0, 2.0, 3.0));