bevy_mod_xr 0.1.1

semi generic Xr Api for Community Driven XR in Bevy
Documentation
use bevy::{
    math::{Quat, Vec3},
    reflect::Reflect,
    transform::components::Transform,
};

#[derive(Clone, Copy, PartialEq, Reflect, Debug)]
pub struct XrPose {
    pub translation: Vec3,
    pub rotation: Quat,
}

impl Default for XrPose {
    fn default() -> Self {
        Self::IDENTITY
    }
}
impl XrPose {
    pub const IDENTITY: XrPose = XrPose {
        translation: Vec3::ZERO,
        rotation: Quat::IDENTITY,
    };
    pub const fn to_transform(self) -> Transform {
        Transform::from_translation(self.translation).with_rotation(self.rotation)
    }
}