pub struct Rotation3 { /* private fields */ }Expand description
Quaternion rotation requested while loading a scene descriptor.
Values are stored as [x, y, z, w], matching Habitat-Sim’s Python vector
convention for loader rotations.
Implementations§
Source§impl Rotation3
impl Rotation3
Sourcepub const HABITAT_MP3D: Self
pub const HABITAT_MP3D: Self
Habitat-Sim’s default rotation for MP3D semantic scenes.
Sourcepub const fn from_xyzw(xyzw: [f32; 4]) -> Self
pub const fn from_xyzw(xyzw: [f32; 4]) -> Self
Builds a rotation from a quaternion represented as [x, y, z, w].
Sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Returns whether this is the identity rotation.
Sourcepub fn transform_vector(self, vector: Vec3) -> Vec3
pub fn transform_vector(self, vector: Vec3) -> Vec3
Rotates a vector.
Trait Implementations§
impl Copy for Rotation3
impl StructuralPartialEq for Rotation3
Auto Trait Implementations§
impl Freeze for Rotation3
impl RefUnwindSafe for Rotation3
impl Send for Rotation3
impl Sync for Rotation3
impl Unpin for Rotation3
impl UnsafeUnpin for Rotation3
impl UnwindSafe for Rotation3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more