pub struct OrientedBoundingRect {
pub center: [f64; 2],
pub axis_u: [f64; 2],
pub axis_v: [f64; 2],
pub half_width: f64,
pub half_height: f64,
pub angle: f64,
pub corners: [[f64; 2]; 4],
}Expand description
An oriented bounding rectangle defined by center, axes, and half-extents
Fields§
§center: [f64; 2]Center of the rectangle
axis_u: [f64; 2]First axis direction (unit vector)
axis_v: [f64; 2]Second axis direction (unit vector, perpendicular to axis_u)
half_width: f64Half-extent along axis_u
half_height: f64Half-extent along axis_v
angle: f64Rotation angle in radians (angle of axis_u from positive x-axis)
corners: [[f64; 2]; 4]The four corner vertices of the rectangle
Implementations§
Trait Implementations§
Source§impl Clone for OrientedBoundingRect
impl Clone for OrientedBoundingRect
Source§fn clone(&self) -> OrientedBoundingRect
fn clone(&self) -> OrientedBoundingRect
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OrientedBoundingRect
impl RefUnwindSafe for OrientedBoundingRect
impl Send for OrientedBoundingRect
impl Sync for OrientedBoundingRect
impl Unpin for OrientedBoundingRect
impl UnsafeUnpin for OrientedBoundingRect
impl UnwindSafe for OrientedBoundingRect
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
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.