pub struct AllowedOrientations { /* private fields */ }Expand description
Permitted rotations without reflection and after canonical x-axis reflection.
Choose no reflection or one permitted local reflection axis, then an allowed rotation.
Reflecting across an axis at angle a, followed by rotation r, is represented by
DTransformation with reflected = true and rotation r + 2*a.
All angles in this type are radians. Translation is unrestricted.
Implementations§
Source§impl AllowedOrientations
impl AllowedOrientations
Sourcepub const MAX_ANGLES: usize = 65_536
pub const MAX_ANGLES: usize = 65_536
Maximum entries per angle list and per reflected Cartesian expansion, before deduplication of the resulting angles. Shared by JSON rotation modes.
Sourcepub fn new(rotations: RotationRange, reflection_axes: Vec<f32>) -> Result<Self>
pub fn new(rotations: RotationRange, reflection_axes: Vec<f32>) -> Result<Self>
Validates finite angles and normalizes rotations modulo 2π and axes modulo π. Empty discrete rotations mean fixed zero; empty axes disable reflection. Duplicate canonical angles are removed by exact equality after normalization.
Sourcepub fn rotations(&self) -> &RotationRange
pub fn rotations(&self) -> &RotationRange
Permitted rotations without reflection, in radians.
RotationRange::None means fixed zero.
Sourcepub fn rotations_after_reflection(&self) -> Option<&RotationRange>
pub fn rotations_after_reflection(&self) -> Option<&RotationRange>
Permitted rotations after canonical x-axis reflection, in radians.
These are transformation angles, not reflection axes.
None disables reflection; RotationRange::None means fixed zero after reflection.
Sourcepub fn allows(&self, transformation: &DTransformation) -> bool
pub fn allows(&self, transformation: &DTransformation) -> bool
Checks orientation only, allowing 4 f32 epsilons of a full turn for matrix decomposition and angle wrapping. This tolerance is not used to deduplicate inputs.
Trait Implementations§
Source§impl Clone for AllowedOrientations
impl Clone for AllowedOrientations
Source§fn clone(&self) -> AllowedOrientations
fn clone(&self) -> AllowedOrientations
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AllowedOrientations
impl Debug for AllowedOrientations
Source§impl PartialEq for AllowedOrientations
impl PartialEq for AllowedOrientations
Source§fn eq(&self, other: &AllowedOrientations) -> bool
fn eq(&self, other: &AllowedOrientations) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AllowedOrientations
Auto Trait Implementations§
impl Freeze for AllowedOrientations
impl RefUnwindSafe for AllowedOrientations
impl Send for AllowedOrientations
impl Sync for AllowedOrientations
impl Unpin for AllowedOrientations
impl UnsafeUnpin for AllowedOrientations
impl UnwindSafe for AllowedOrientations
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more