Struct rscolorq::Matrix3d [−][src]
Three-dimensional matrix.
Implementations
impl<T: Clone + Default> Matrix3d<T>
[src]
pub fn new(width: usize, height: usize, depth: usize) -> Self
[src]
Creates a new Matrix3d
initialized with default values.
pub fn from_vec(data: Vec<T>, width: usize, height: usize, depth: usize) -> Self
[src]
Creates a Matrix3d
from a Vec.
Panics if width
by height
by depth
does not equal the supplied
Vec’s length.
ⓘ
let matrix = rscolorq::Matrix3d::from_vec(vec![0, 1, 2], 1, 2, 1);
pub fn width(&self) -> usize
[src]
Returns the width of the Matrix3d
.
pub fn height(&self) -> usize
[src]
Returns the height of the Matrix3d
.
pub fn depth(&self) -> usize
[src]
Returns the depth of the Matrix3d
.
pub fn get(&self, i: usize, j: usize, k: usize) -> Option<&T>
[src]
Returns a reference to the indexed element.
pub fn get_mut(&mut self, i: usize, j: usize, k: usize) -> Option<&mut T>
[src]
Returns a mutable reference to the indexed element.
pub fn into_raw_vec(self) -> Vec<T>
[src]
Consume the Matrix3d
and return the underlying Vec.
pub fn iter(&self) -> Iter<'_, T>
[src]
Returns an iterator to the underlying Vec.
pub fn iter_mut(&mut self) -> IterMut<'_, T>
[src]
Returns a mutable iterator to the underlying Vec.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Matrix3d<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Matrix3d<T> where
T: Send,
T: Send,
impl<T> Sync for Matrix3d<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Matrix3d<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Matrix3d<T> where
T: UnwindSafe,
T: 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,
[src]
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
pub fn convert_into(self) -> U
[src]
pub fn convert_unclamped_into(self) -> U
[src]
pub fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,