pub struct Rectangle3 {
pub origin: DVec3,
pub x: DVec3,
pub y: DVec3,
}Expand description
A planar rectangle in three-dimensional space.
Stored as a corner and two edge vectors rather than four corners, so the
parallelogram property holds by construction and cannot drift as corners
are edited independently. Whether x and y are perpendicular is not
enforced: an importer may produce a sheared quad, and refusing it here
would lose data the caller may still want to inspect or repair.
Fields§
§origin: DVec3Corner the edge vectors start from.
x: DVec3First edge vector, from origin.
y: DVec3Second edge vector, from origin.
Implementations§
Source§impl Rectangle3
impl Rectangle3
Trait Implementations§
Source§impl Clone for Rectangle3
impl Clone for Rectangle3
Source§fn clone(&self) -> Rectangle3
fn clone(&self) -> Rectangle3
Returns a copy 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 moreSource§impl Debug for Rectangle3
impl Debug for Rectangle3
Source§impl PartialEq for Rectangle3
impl PartialEq for Rectangle3
impl Copy for Rectangle3
impl StructuralPartialEq for Rectangle3
Auto Trait Implementations§
impl Freeze for Rectangle3
impl RefUnwindSafe for Rectangle3
impl Send for Rectangle3
impl Sync for Rectangle3
impl Unpin for Rectangle3
impl UnwindSafe for Rectangle3
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 more