Struct nannou::geom::cuboid::Cuboid [−][src]
Expand description
A light-weight Cuboid
type with many helper and utility methods.
The cuboid is also known as a “rectangular prism”.
Cuboid
is implemented similarly to geom::Rect
but with 3 axes instead of 2.
Fields
x: Range<S>
The start and end along the x axis.
y: Range<S>
The start and end along the y axis.
z: Range<S>
The start and end along the z axis.
Implementations
Construct a Rect from a given centre point (x, y, z) and dimensions (width, height, depth).
The six ranges used for the Cuboid
’s eight subdivisions.
The position and dimensions of the cuboid.
Construct a cuboid from its x, y and z ranges.
Converts self
to an absolute Cuboid
so that the magnitude of each range is always
positive.
Does the given cuboid contain the given point.
Stretches the closest side(s) to the given point if the point lies outside of the Cuboid area.
The cuboid representing the area in which two cuboids overlap.
The cuboid that encompass the two given cuboids.
The quad for the face at the start of the range along the x axis.
The quad for the face at the end of the range along the x axis.
The quad for the face at the start of the range along the y axis.
The quad for the face at the end of the range along the y axis.
The quad for the face at the start of the range along the z axis.
The quad for the face at the end of the range along the z axis.
The 8 corners of the cuboid in the following order:
y | z |/ 0---x 6---7 /| /| 2---3 | | 4-|-5 |/ |/ 0---1
The same as corners
but produces an iterator rather than a fixed-size array.
The 6 faces of the of the cuboid in the order yielded by the Faces
iterator.
An iterator yielding a quad for each face on the cuboid.
Produce an iterator yielding every triangle in the cuboid (two for each face).
Uses the faces_iter
method internally.
The dimensions (width, height and depth) of the cuboid as a tuple.
The cuboid with some padding applied to the left side.
The cuboid with some padding applied to the right side.
The cuboid with some padding applied to the bottom side.
The cuboid with some padding applied to the front side.
The cuboid with some padding applied to the back side.
Construct a Rect from a given centre point (x, y, z) and dimensions (width, height, depth).
Stretches the closest side(s) to the given point if the point lies outside of the Cuboid area.
Construct a Rect from a given centre point (x, y, z) and dimensions (width, height, depth).
Stretches the closest side(s) to the given point if the point lies outside of the Cuboid area.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<S> RefUnwindSafe for Cuboid<S> where
S: RefUnwindSafe,
impl<S> UnwindSafe for Cuboid<S> where
S: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
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
pub fn vzip(self) -> V