pub struct Lut3d { /* private fields */ }Expand description
Validated three-dimensional cube, with red varying fastest.
Implementations§
Source§impl Lut3d
impl Lut3d
Sourcepub fn new(
size: u16,
domain_min: [f32; 3],
domain_max: [f32; 3],
data: Vec<[f32; 3]>,
) -> Result<Self, ValidationError>
pub fn new( size: u16, domain_min: [f32; 3], domain_max: [f32; 3], data: Vec<[f32; 3]>, ) -> Result<Self, ValidationError>
Freezes a finite 2..=64 cube with a strictly increasing per-channel domain.
Sourcepub fn from_cube(text: &str) -> Result<Self, ValidationError>
pub fn from_cube(text: &str) -> Result<Self, ValidationError>
Parses a bounded 3D .cube, optionally preceded by a 1D shaper.
In combined files DOMAIN_MIN/MAX describe the shaper input. The cube defaults to 0..1 unless LUT_3D_INPUT_RANGE specifies another range.
Sourcepub fn domain_min(&self) -> [f32; 3]
pub fn domain_min(&self) -> [f32; 3]
Minimum input domain.
Sourcepub fn domain_max(&self) -> [f32; 3]
pub fn domain_max(&self) -> [f32; 3]
Maximum input domain.
Sourcepub fn with_shaper(self, shaper: Lut1d) -> Self
pub fn with_shaper(self, shaper: Lut1d) -> Self
Attaches an input shaper; its output is interpreted in the cube domain.
Sourcepub fn shaper(&self) -> Option<&Lut1d>
pub fn shaper(&self) -> Option<&Lut1d>
Optional per-channel input shaper, evaluated before tetrahedral lookup.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Lut3d
impl Freeze for Lut3d
impl RefUnwindSafe for Lut3d
impl Send for Lut3d
impl Sync for Lut3d
impl Unpin for Lut3d
impl UnsafeUnpin for Lut3d
impl UnwindSafe for Lut3d
Blanket Implementations§
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