Struct glamour::Size3

source ·
#[repr(C)]
pub struct Size3<T: Unit = f32> { pub width: T::Scalar, pub height: T::Scalar, pub depth: T::Scalar, }
Expand description

3D size.

Fields§

§width: T::Scalar

Width

§height: T::Scalar

Height

§depth: T::Scalar

Depth

Implementations§

source§

impl<T: Unit> Size3<T>

source

pub fn from_vector(vec: Vector3<T>) -> Self

Interpret vec as size.

source

pub fn to_vector(self) -> Vector3<T>

Convert to vector.

source

pub fn as_vector(&self) -> &Vector3<T>

Reinterpret as vector.

source

pub fn as_vector_mut(&mut self) -> &mut Vector3<T>

Reinterpret as vector.

source

pub fn is_empty(self) -> bool

True if any component is zero, or negative, or NaN.

source

pub fn with_width(self, width: T::Scalar) -> Self

Replace the width component with a new value.

source

pub fn with_height(self, height: T::Scalar) -> Self

Replace the width component with a new value.

source§

impl<T: Unit> Size3<T>

source

pub const ZERO: Self = _

All zeroes.

source

pub const ONE: Self = _

All ones.

source

pub fn new(width: T::Scalar, height: T::Scalar, depth: T::Scalar) -> Self

New size.

source

pub fn from_array(array: [T::Scalar; 3]) -> Self

Instantiate from array. See glam::Vec3::from_array().

source

pub fn to_array(self) -> [T::Scalar; 3]

Convert to array. See glam::Vec3::to_array().

source

pub fn splat(scalar: T::Scalar) -> Self

Instance with all components set to scalar. See glam::Vec3::splat().

source

pub fn write_to_slice(self, slice: &mut [T::Scalar])

Write all components to slice.

source

pub fn cmpeq(self, other: Self) -> BVec3

Return a mask with the result of a component-wise equals comparison. See glam::Vec3::cmpeq().

source

pub fn cmpne(self, other: Self) -> BVec3

Return a mask with the result of a component-wise not-equal comparison. See glam::Vec3::cmpne().

source

pub fn cmpge(self, other: Self) -> BVec3

Return a mask with the result of a component-wise greater-than-or-equal comparison. See glam::Vec3::cmpge().

source

pub fn cmpgt(self, other: Self) -> BVec3

Return a mask with the result of a component-wise greater-than comparison. See glam::Vec3::cmpgt().

source

pub fn cmple(self, other: Self) -> BVec3

Return a mask with the result of a component-wise less-than-or-equal comparison. See glam::Vec3::cmple().

source

pub fn cmplt(self, other: Self) -> BVec3

Return a mask with the result of a component-wise less-than comparison. See glam::Vec3::cmplt().

source

pub fn min(self, other: Self) -> Self

Minimum by component. See glam::Vec3::min().

source

pub fn max(self, other: Self) -> Self

Maximum by component. See glam::Vec3::max().

source

pub fn min_element(self) -> T::Scalar

Horizontal minimum (smallest component). See glam::Vec3::min_element().

source

pub fn max_element(self) -> T::Scalar

Horizontal maximum (largest component). See glam::Vec3::max_element().

source

pub fn clamp(self, min: Self, max: Self) -> Self

Component-wise clamp. See glam::Vec3::clamp().

source

pub fn select(mask: BVec3, a: Self, b: Self) -> Self

Select components from two instances based on a mask. See glam::Vec3::select().

source

pub fn from_untyped(untyped: Size3<T::Scalar>) -> Size3<T>

Bitcast an untyped instance to self.

source

pub fn to_untyped(self) -> Size3<T::Scalar>

Bitcast self to an untyped instance.

source

pub fn as_untyped(&self) -> &Size3<T::Scalar>

Reinterpret cast self as the untyped variant.

source

pub fn as_untyped_mut(&mut self) -> &mut Size3<T::Scalar>

Reinterpret cast self as the untyped variant.

source

pub fn cast<T2>(self) -> Size3<T2>
where T2: Unit<Scalar = T::Scalar>,

Cast to a different coordinate space with the same underlying scalar type.

source

pub fn cast_ref<T2>(&self) -> &Size3<T2>
where T2: Unit<Scalar = T::Scalar>,

Cast to a different coordinate space with the same underlying scalar type.

source

pub fn cast_mut<T2>(&mut self) -> &mut Size3<T2>
where T2: Unit<Scalar = T::Scalar>,

Cast to a different coordinate space with the same underlying scalar type.

source

pub fn try_cast<T2>(self) -> Option<Size3<T2>>
where T2: Unit,

Cast to a different coordinate space with scalar type conversion. Returns None if any component could not be converted to the target scalar type.

source

pub const fn from_tuple( (width, height, depth): (T::Scalar, T::Scalar, T::Scalar) ) -> Self

Instantiate from tuple.

source

pub const fn to_tuple(self) -> (T::Scalar, T::Scalar, T::Scalar)

Convert to tuple.

source

pub fn as_array(&self) -> &[T::Scalar; 3]

Reinterpret as array.

source

pub fn as_array_mut(&mut self) -> &mut [T::Scalar; 3]

Reinterpret as mutable array.

source

pub fn get(&self, index: usize) -> T::Scalar

Get component at index.

source

pub fn set(&mut self, index: usize, value: T::Scalar)

Set component at index.

source

pub fn const_get<const N: usize>(&self) -> T::Scalar

Get component at index N.

source

pub fn const_set<const N: usize>(&mut self, value: T::Scalar)

Set component at index N.

source

pub fn truncate(self) -> Size2<T>

Truncate to Size2. See glam::Vec3::truncate().

source

pub fn volume(&self) -> T::Scalar

Calculate the volume.

source

pub fn with_depth(self, depth: T::Scalar) -> Self

Replace the depth component with a new value.

source§

impl<T> Size3<T>
where T: Unit, T::Scalar: FloatScalar,

source

pub const NAN: Self = _

All NaN.

source

pub const INFINITY: Self = _

All positive infinity.

source

pub const NEG_INFINITY: Self = _

All negative infinity.

source

pub fn is_finite(&self) -> bool

True if all components are non-infinity and non-NaN. See glam::Vec3::is_finite().

source

pub fn is_nan(&self) -> bool

True if any component is NaN. See glam::Vec3::is_nan().

source

pub fn is_nan_mask(&self) -> BVec3

Return a mask where each bit is set if the corresponding component is NaN. See glam::Vec3::is_nan_mask().

source

pub fn ceil(self) -> Self

Round all components up. See glam::Vec3::ceil().

source

pub fn floor(self) -> Self

Round all components down. See glam::Vec3::floor().

source

pub fn round(self) -> Self

Round all components. See glam::Vec3::round().

source

pub fn fract(self) -> Self

source

pub fn fract_gl(self) -> Self

source

pub fn lerp(self, other: Self, t: T::Scalar) -> Self

Linear interpolation. See glam::Vec3::lerp().

Trait Implementations§

source§

impl<T: Unit> AbsDiffEq for Size3<T>

§

type Epsilon = <<T as Unit>::Scalar as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
source§

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
source§

impl<T: Unit> Add for Size3<T>

§

type Output = Size3<T>

The resulting type after applying the + operator.
source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
source§

impl<T: Unit> AddAssign for Size3<T>

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl<T: Unit> AsMut<[<T as Unit>::Scalar]> for Size3<T>

source§

fn as_mut(&mut self) -> &mut [T::Scalar]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T: Unit> AsMut<[<T as Unit>::Scalar; 3]> for Size3<T>

source§

fn as_mut(&mut self) -> &mut [T::Scalar; 3]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T> AsMut<DVec3> for Size3<T>
where T: Unit<Scalar = f64>,

source§

fn as_mut(&mut self) -> &mut DVec3

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T> AsMut<I64Vec3> for Size3<T>
where T: Unit<Scalar = i64>,

source§

fn as_mut(&mut self) -> &mut I64Vec3

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T> AsMut<IVec3> for Size3<T>
where T: Unit<Scalar = i32>,

source§

fn as_mut(&mut self) -> &mut IVec3

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T> AsMut<U64Vec3> for Size3<T>
where T: Unit<Scalar = u64>,

source§

fn as_mut(&mut self) -> &mut U64Vec3

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T> AsMut<UVec3> for Size3<T>
where T: Unit<Scalar = u32>,

source§

fn as_mut(&mut self) -> &mut UVec3

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T> AsMut<Vec3> for Size3<T>
where T: Unit<Scalar = f32>,

source§

fn as_mut(&mut self) -> &mut Vec3

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<T: Unit> AsRaw for Size3<T>

source§

fn as_raw(&self) -> &Self::Raw

By-ref conversion to Self::Raw.
source§

fn as_raw_mut(&mut self) -> &mut Self::Raw

By-ref mutable conversion to Self::Raw.
source§

impl<T: Unit> AsRef<[<T as Unit>::Scalar]> for Size3<T>

source§

fn as_ref(&self) -> &[T::Scalar]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T: Unit> AsRef<[<T as Unit>::Scalar; 3]> for Size3<T>

source§

fn as_ref(&self) -> &[T::Scalar; 3]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<DVec3> for Size3<T>
where T: Unit<Scalar = f64>,

source§

fn as_ref(&self) -> &DVec3

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<I64Vec3> for Size3<T>
where T: Unit<Scalar = i64>,

source§

fn as_ref(&self) -> &I64Vec3

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<IVec3> for Size3<T>
where T: Unit<Scalar = i32>,

source§

fn as_ref(&self) -> &IVec3

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<U64Vec3> for Size3<T>
where T: Unit<Scalar = u64>,

source§

fn as_ref(&self) -> &U64Vec3

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<UVec3> for Size3<T>
where T: Unit<Scalar = u32>,

source§

fn as_ref(&self) -> &UVec3

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<Vec3> for Size3<T>
where T: Unit<Scalar = f32>,

source§

fn as_ref(&self) -> &Vec3

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> Borrow<DVec3> for Size3<T>
where T: Unit<Scalar = f64>,

source§

fn borrow(&self) -> &DVec3

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<I64Vec3> for Size3<T>
where T: Unit<Scalar = i64>,

source§

fn borrow(&self) -> &I64Vec3

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<IVec3> for Size3<T>
where T: Unit<Scalar = i32>,

source§

fn borrow(&self) -> &IVec3

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Size3<T>> for DVec3
where T: Unit<Scalar = f64>,

source§

fn borrow(&self) -> &Size3<T>

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Size3<T>> for I64Vec3
where T: Unit<Scalar = i64>,

source§

fn borrow(&self) -> &Size3<T>

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Size3<T>> for IVec3
where T: Unit<Scalar = i32>,

source§

fn borrow(&self) -> &Size3<T>

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Size3<T>> for U64Vec3
where T: Unit<Scalar = u64>,

source§

fn borrow(&self) -> &Size3<T>

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Size3<T>> for UVec3
where T: Unit<Scalar = u32>,

source§

fn borrow(&self) -> &Size3<T>

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Size3<T>> for Vec3
where T: Unit<Scalar = f32>,

source§

fn borrow(&self) -> &Size3<T>

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<U64Vec3> for Size3<T>
where T: Unit<Scalar = u64>,

source§

fn borrow(&self) -> &U64Vec3

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<UVec3> for Size3<T>
where T: Unit<Scalar = u32>,

source§

fn borrow(&self) -> &UVec3

Immutably borrows from an owned value. Read more
source§

impl<T> Borrow<Vec3> for Size3<T>
where T: Unit<Scalar = f32>,

source§

fn borrow(&self) -> &Vec3

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<DVec3> for Size3<T>
where T: Unit<Scalar = f64>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<I64Vec3> for Size3<T>
where T: Unit<Scalar = i64>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<IVec3> for Size3<T>
where T: Unit<Scalar = i32>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Size3<T>> for DVec3
where T: Unit<Scalar = f64>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Size3<T>> for I64Vec3
where T: Unit<Scalar = i64>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Size3<T>> for IVec3
where T: Unit<Scalar = i32>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Size3<T>> for U64Vec3
where T: Unit<Scalar = u64>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Size3<T>> for UVec3
where T: Unit<Scalar = u32>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Size3<T>> for Vec3
where T: Unit<Scalar = f32>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<U64Vec3> for Size3<T>
where T: Unit<Scalar = u64>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<UVec3> for Size3<T>
where T: Unit<Scalar = u32>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<Vec3> for Size3<T>
where T: Unit<Scalar = f32>,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T: Unit> Clone for Size3<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<T: Unit> Debug for Size3<T>

source§

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

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

impl<T: Unit> Default for Size3<T>

source§

fn default() -> Self

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

impl<T: Unit> Div<<T as Unit>::Scalar> for Size3<T>

§

type Output = Size3<T>

The resulting type after applying the / operator.
source§

fn div(self, other: T::Scalar) -> Self

Performs the / operation. Read more
source§

impl<T: Unit> DivAssign<<T as Unit>::Scalar> for Size3<T>

source§

fn div_assign(&mut self, other: T::Scalar)

Performs the /= operation. Read more
source§

impl<T: Unit> From<[<T as Unit>::Scalar; 3]> for Size3<T>

source§

fn from(arr: [T::Scalar; 3]) -> Self

Converts to this type from the input type.
source§

impl<T: Unit> From<(<T as Unit>::Scalar, <T as Unit>::Scalar, <T as Unit>::Scalar)> for Size3<T>

source§

fn from(tuple: (T::Scalar, T::Scalar, T::Scalar)) -> Size3<T>

Converts to this type from the input type.
source§

impl<T> From<DVec3> for Size3<T>
where T: Unit<Scalar = f64>,

source§

fn from(vec: DVec3) -> Size3<T>

Converts to this type from the input type.
source§

impl<T> From<I64Vec3> for Size3<T>
where T: Unit<Scalar = i64>,

source§

fn from(vec: I64Vec3) -> Size3<T>

Converts to this type from the input type.
source§

impl<T> From<IVec3> for Size3<T>
where T: Unit<Scalar = i32>,

source§

fn from(vec: IVec3) -> Size3<T>

Converts to this type from the input type.
source§

impl<T: Unit> From<Size3<T>> for [T::Scalar; 3]

source§

fn from(v: Size3<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Unit> From<Size3<T>> for (T::Scalar, T::Scalar, T::Scalar)

source§

fn from(value: Size3<T>) -> (T::Scalar, T::Scalar, T::Scalar)

Converts to this type from the input type.
source§

impl<T> From<Size3<T>> for DVec3
where T: Unit<Scalar = f64>,

source§

fn from(vec: Size3<T>) -> DVec3

Converts to this type from the input type.
source§

impl<T> From<Size3<T>> for I64Vec3
where T: Unit<Scalar = i64>,

source§

fn from(vec: Size3<T>) -> I64Vec3

Converts to this type from the input type.
source§

impl<T> From<Size3<T>> for IVec3
where T: Unit<Scalar = i32>,

source§

fn from(vec: Size3<T>) -> IVec3

Converts to this type from the input type.
source§

impl<T> From<Size3<T>> for U64Vec3
where T: Unit<Scalar = u64>,

source§

fn from(vec: Size3<T>) -> U64Vec3

Converts to this type from the input type.
source§

impl<T> From<Size3<T>> for UVec3
where T: Unit<Scalar = u32>,

source§

fn from(vec: Size3<T>) -> UVec3

Converts to this type from the input type.
source§

impl<T> From<Size3<T>> for Vec3
where T: Unit<Scalar = f32>,

source§

fn from(vec: Size3<T>) -> Vec3

Converts to this type from the input type.
source§

impl<T: Unit> From<Size3<T>> for Vector3<T>

source§

fn from(point: Size3<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<U64Vec3> for Size3<T>
where T: Unit<Scalar = u64>,

source§

fn from(vec: U64Vec3) -> Size3<T>

Converts to this type from the input type.
source§

impl<T> From<UVec3> for Size3<T>
where T: Unit<Scalar = u32>,

source§

fn from(vec: UVec3) -> Size3<T>

Converts to this type from the input type.
source§

impl<T> From<Vec3> for Size3<T>
where T: Unit<Scalar = f32>,

source§

fn from(vec: Vec3) -> Size3<T>

Converts to this type from the input type.
source§

impl<T: Unit> From<Vector3<T>> for Size3<T>

source§

fn from(vec: Vector3<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Unit> FromRaw for Size3<T>

source§

fn from_raw(raw: Self::Raw) -> Self

By-value conversion from Self::Raw.
source§

impl<T> Hash for Size3<T>
where T: Unit, T::Scalar: Hash,

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: Unit> Index<usize> for Size3<T>

§

type Output = <T as Unit>::Scalar

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: Unit> IndexMut<usize> for Size3<T>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<T: Unit> IntoIterator for Size3<T>

§

type Item = <T as Unit>::Scalar

The type of the elements being iterated over.
§

type IntoIter = <[<T as Unit>::Scalar; 3] as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T: Unit> Mul<<T as Unit>::Scalar> for Size3<T>

§

type Output = Size3<T>

The resulting type after applying the * operator.
source§

fn mul(self, other: T::Scalar) -> Self

Performs the * operation. Read more
source§

impl<T: Unit> MulAssign<<T as Unit>::Scalar> for Size3<T>

source§

fn mul_assign(&mut self, other: T::Scalar)

Performs the *= operation. Read more
source§

impl<T: Unit> PartialEq<[<T as Unit>::Scalar; 3]> for Size3<T>

source§

fn eq(&self, other: &[T::Scalar; 3]) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Unit> PartialEq<(<T as Unit>::Scalar, <T as Unit>::Scalar, <T as Unit>::Scalar)> for Size3<T>

source§

fn eq(&self, (width, height, depth): &(T::Scalar, T::Scalar, T::Scalar)) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Unit> PartialEq for Size3<T>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Unit> RelativeEq for Size3<T>
where T::Scalar: RelativeEq,

source§

fn default_max_relative() -> Self::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
source§

fn relative_ne( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of RelativeEq::relative_eq.
source§

impl<T: Unit> Rem<<T as Unit>::Scalar> for Size3<T>

§

type Output = Size3<T>

The resulting type after applying the % operator.
source§

fn rem(self, other: T::Scalar) -> Self

Performs the % operation. Read more
source§

impl<T: Unit> RemAssign<<T as Unit>::Scalar> for Size3<T>

source§

fn rem_assign(&mut self, other: T::Scalar)

Performs the %= operation. Read more
source§

impl<T: Unit> Sub for Size3<T>

§

type Output = Size3<T>

The resulting type after applying the - operator.
source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
source§

impl<T: Unit> SubAssign for Size3<T>

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

impl<T: Unit> ToRaw for Size3<T>

§

type Raw = <<T as Unit>::Scalar as Scalar>::Vec3

The underlying glam type.
source§

fn to_raw(self) -> Self::Raw

By-value conversion to Self::Raw.
source§

impl<T: Unit> TransparentWrapper<<<T as Unit>::Scalar as Scalar>::Vec3> for Size3<T>

source§

fn wrap(s: Inner) -> Self
where Self: Sized,

Convert the inner type into the wrapper type.
source§

fn wrap_ref(s: &Inner) -> &Self

Convert a reference to the inner type into a reference to the wrapper type.
source§

fn wrap_mut(s: &mut Inner) -> &mut Self

Convert a mutable reference to the inner type into a mutable reference to the wrapper type.
source§

fn wrap_slice(s: &[Inner]) -> &[Self]
where Self: Sized,

Convert a slice to the inner type into a slice to the wrapper type.
source§

fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]
where Self: Sized,

Convert a mutable slice to the inner type into a mutable slice to the wrapper type.
source§

fn peel(s: Self) -> Inner
where Self: Sized,

Convert the wrapper type into the inner type.
source§

fn peel_ref(s: &Self) -> &Inner

Convert a reference to the wrapper type into a reference to the inner type.
source§

fn peel_mut(s: &mut Self) -> &mut Inner

Convert a mutable reference to the wrapper type into a mutable reference to the inner type.
source§

fn peel_slice(s: &[Self]) -> &[Inner]
where Self: Sized,

Convert a slice to the wrapped type into a slice to the inner type.
source§

fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]
where Self: Sized,

Convert a mutable slice to the wrapped type into a mutable slice to the inner type.
source§

impl<T: Unit> UlpsEq for Size3<T>
where T::Scalar: UlpsEq,

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
source§

fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
source§

impl<T: Unit> Zeroable for Size3<T>

SAFETY: All members are Pod, and we are #[repr(C)].

source§

fn zeroed() -> Self

source§

impl<T: Unit> Copy for Size3<T>

source§

impl<T> Eq for Size3<T>
where T: Unit, T::Scalar: Eq,

source§

impl<T: Unit> Pod for Size3<T>

SAFETY: All members are Pod, and we are #[repr(C)].

Auto Trait Implementations§

§

impl<T> Freeze for Size3<T>
where <T as Unit>::Scalar: Freeze,

§

impl<T> RefUnwindSafe for Size3<T>
where <T as Unit>::Scalar: RefUnwindSafe,

§

impl<T> Send for Size3<T>

§

impl<T> Sync for Size3<T>

§

impl<T> Unpin for Size3<T>
where <T as Unit>::Scalar: Unpin,

§

impl<T> UnwindSafe for Size3<T>
where <T as Unit>::Scalar: 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> CheckedBitPattern for T
where T: AnyBitPattern,

§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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> 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> AnyBitPattern for T
where T: Pod,

source§

impl<T> NoUninit for T
where T: Pod,

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

source§

impl<T> PodValue for T
where T: Copy + Debug + Default + PartialEq + Pod + Send + Sync + Serializable + 'static,

source§

impl<T> Serializable for T