pub struct SubdivisionRanges<S> {
pub x_a: Range<S>,
pub x_b: Range<S>,
pub y_a: Range<S>,
pub y_b: Range<S>,
pub z_a: Range<S>,
pub z_b: Range<S>,
}
Expand description
The three ranges that make up the 8 subdivisions of a cuboid.
Fields§
§x_a: Range<S>
The first half of the x axis range.
x_b: Range<S>
The second half of the x axis range.
y_a: Range<S>
The first half of the y axis range.
y_b: Range<S>
The second half of the y axis range.
z_a: Range<S>
The first half of the z axis range.
z_b: Range<S>
The second half of the z axis range.
Implementations§
source§impl<S> SubdivisionRanges<S>where
S: Copy,
impl<S> SubdivisionRanges<S>where
S: Copy,
sourcepub fn cuboids(&self) -> [Cuboid<S>; 8]
pub fn cuboids(&self) -> [Cuboid<S>; 8]
The Cuboid
s representing each of the eight subdivisions.
Subdivisions are yielded in the following order:
- Front bottom left
- Front bottom right
- Front top left
- Front top right
- Back bottom left
- Back bottom right
- Back top left
- Back top right
sourcepub fn cuboids_iter(self) -> Subdivisions<S> ⓘ
pub fn cuboids_iter(self) -> Subdivisions<S> ⓘ
The same as cuboids
but each subdivision is yielded via the returned Iterator
.
Trait Implementations§
source§impl<S> Clone for SubdivisionRanges<S>where
S: Clone,
impl<S> Clone for SubdivisionRanges<S>where
S: Clone,
source§fn clone(&self) -> SubdivisionRanges<S>
fn clone(&self) -> SubdivisionRanges<S>
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<S> Debug for SubdivisionRanges<S>where
S: Debug,
impl<S> Debug for SubdivisionRanges<S>where
S: Debug,
source§impl<S> PartialEq for SubdivisionRanges<S>where
S: PartialEq,
impl<S> PartialEq for SubdivisionRanges<S>where
S: PartialEq,
source§fn eq(&self, other: &SubdivisionRanges<S>) -> bool
fn eq(&self, other: &SubdivisionRanges<S>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<S> Copy for SubdivisionRanges<S>where
S: Copy,
impl<S> StructuralPartialEq for SubdivisionRanges<S>
Auto Trait Implementations§
impl<S> RefUnwindSafe for SubdivisionRanges<S>where
S: RefUnwindSafe,
impl<S> Send for SubdivisionRanges<S>where
S: Send,
impl<S> Sync for SubdivisionRanges<S>where
S: Sync,
impl<S> Unpin for SubdivisionRanges<S>where
S: Unpin,
impl<S> UnwindSafe for SubdivisionRanges<S>where
S: UnwindSafe,
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds
error is returned which contains the unclamped color. Read more