Struct pax_runtime::layout::TransformAndBounds

source ·
pub struct TransformAndBounds<F, T = F> {
    pub transform: Transform2<F, T>,
    pub bounds: (f64, f64),
}

Fields§

§transform: Transform2<F, T>§bounds: (f64, f64)

Implementations§

source§

impl<F: Space, T: Space> TransformAndBounds<F, T>

source

pub fn center(&self) -> Point2<T>

source

pub fn corners(&self) -> [Point2<T>; 4]

source

pub fn contains_point(&self, point: Point2<T>) -> bool

source

pub fn as_pure_size(self) -> Self

source

pub fn as_pure_scale(self) -> Self

source

pub fn cast_spaces<A: Space, B: Space>(self) -> TransformAndBounds<A, B>

source

pub fn as_transform(&self) -> Transform2<F, T>

source§

impl<F: Space, T: Space> TransformAndBounds<F, T>

source

pub fn inverse(&self) -> TransformAndBounds<T, F>

source

pub fn intersects(&self, other: &Self) -> bool

Trait Implementations§

source§

impl<F, T> Clone for TransformAndBounds<F, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Space, T: Space> Debug for TransformAndBounds<F, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F: Space, T: Space> Default for TransformAndBounds<F, T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<F, T> Interpolatable for TransformAndBounds<F, T>

Properties that are currently re-computed each frame before rendering.

source§

fn interpolate(&self, _other: &Self, _t: f64) -> Self

source§

impl<W1: Space, W2: Space, W3: Space> Mul<TransformAndBounds<W1, W2>> for TransformAndBounds<W2, W3>

§

type Output = TransformAndBounds<W1, W3>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: TransformAndBounds<W1, W2>) -> Self::Output

Performs the * operation. Read more
source§

impl<F, T> Copy for TransformAndBounds<F, T>

Auto Trait Implementations§

§

impl<F, T> Freeze for TransformAndBounds<F, T>

§

impl<F, T> RefUnwindSafe for TransformAndBounds<F, T>

§

impl<F, T> Send for TransformAndBounds<F, T>
where F: Send, T: Send,

§

impl<F, T> Sync for TransformAndBounds<F, T>
where F: Sync, T: Sync,

§

impl<F, T> Unpin for TransformAndBounds<F, T>
where F: Unpin, T: Unpin,

§

impl<F, T> UnwindSafe for TransformAndBounds<F, T>
where F: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> RoundFrom<T> for T

source§

fn round_from(x: T) -> T

Performs the conversion.
source§

impl<T, U> RoundInto<U> for T
where U: RoundFrom<T>,

source§

fn round_into(self) -> U

Performs the conversion.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> PropertyValue for T
where T: Default + Clone + Interpolatable + 'static,