pub struct Lut3dData {
pub edge_length: u32,
pub domain_min: [f32; 3],
pub domain_max: [f32; 3],
pub values: Vec<[f32; 3]>,
}Expand description
Canonical RGB samples for one cubic 3D lookup table.
Fields§
§edge_length: u32Equal width, height, and depth of the cube.
domain_min: [f32; 3]Per-channel input-domain lower bound declared by the file.
domain_max: [f32; 3]Per-channel input-domain upper bound declared by the file.
values: Vec<[f32; 3]>RGB samples in blue-major, green-middle, red-fastest order.
Implementations§
Source§impl Lut3dData
impl Lut3dData
Sourcepub fn from_cube(text: &str) -> Result<Self, LutParseError>
pub fn from_cube(text: &str) -> Result<Self, LutParseError>
Parses the portable 3D subset of the Adobe/Resolve .cube format.
Accepts TITLE, comments, per-channel domains, LUT_3D_INPUT_RANGE, CRLF, and a leading
UTF-8 BOM (browsers strip it, std::fs::read_to_string keeps it). 1D tables are rejected
rather than misread.
§Errors
Returns a line-oriented diagnostic for malformed or unsupported input.
Trait Implementations§
impl StructuralPartialEq for Lut3dData
Auto Trait Implementations§
impl Freeze for Lut3dData
impl RefUnwindSafe for Lut3dData
impl Send for Lut3dData
impl Sync for Lut3dData
impl Unpin for Lut3dData
impl UnsafeUnpin for Lut3dData
impl UnwindSafe for Lut3dData
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more