Skip to main content

Hypercube

Struct Hypercube 

Source
pub struct Hypercube<'a> {
    array: &'a [f32],
    x_stride: u32,
    y_stride: u32,
    z_stride: u32,
    grid_size: [u8; 4],
}
Expand description

4D CLUT helper.

Represents hypercube.

Fields§

§array: &'a [f32]§x_stride: u32§y_stride: u32§z_stride: u32§grid_size: [u8; 4]

Implementations§

Source§

impl Hypercube<'_>

Source

pub fn new( array: &[f32], grid_size: usize, channels: usize, ) -> Result<Hypercube<'_>, CmsError>

Source

pub fn new_hypercube( array: &[f32], grid_size: [u8; 4], channels: usize, ) -> Result<Hypercube<'_>, CmsError>

Source§

impl Hypercube<'_>

Source

fn quadlinear<T: From<f32> + Add<T, Output = T> + Mul<T, Output = T> + FusedMultiplyAdd<T> + Sub<T, Output = T> + Copy + FusedMultiplyNegAdd<T>>( &self, lin_x: f32, lin_y: f32, lin_z: f32, lin_w: f32, r: impl Fetcher4<T>, ) -> T

Source

pub fn quadlinear_vec3( &self, lin_x: f32, lin_y: f32, lin_z: f32, lin_w: f32, ) -> Vector3f

Source

pub fn quadlinear_vec4( &self, lin_x: f32, lin_y: f32, lin_z: f32, lin_w: f32, ) -> Vector4f

Auto Trait Implementations§

§

impl<'a> Freeze for Hypercube<'a>

§

impl<'a> RefUnwindSafe for Hypercube<'a>

§

impl<'a> Send for Hypercube<'a>

§

impl<'a> Sync for Hypercube<'a>

§

impl<'a> Unpin for Hypercube<'a>

§

impl<'a> UnsafeUnpin for Hypercube<'a>

§

impl<'a> UnwindSafe for Hypercube<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.