pub struct FixedFunctionTransform { /* private fields */ }Expand description
Wraps one of OCIO’s fixed-function transform styles.
Implementations§
Source§impl FixedFunctionTransform
impl FixedFunctionTransform
Sourcepub fn create(style: FixedFunctionStyle) -> Result<Self>
pub fn create(style: FixedFunctionStyle) -> Result<Self>
Create a fixed-function transform with the given style using default parameters.
Sourcepub fn create_with_params(
style: FixedFunctionStyle,
params: &[f64],
) -> Result<Self>
pub fn create_with_params( style: FixedFunctionStyle, params: &[f64], ) -> Result<Self>
Create a fixed-function transform with the given style and custom parameters.
Sourcepub fn style(&self) -> FixedFunctionStyle
pub fn style(&self) -> FixedFunctionStyle
Return the current fixed-function style.
For compatibility, unknown styles fall back to AcesRedMod03.
Use Self::try_style to detect a style unavailable at this feature level.
Sourcepub fn try_style(&self) -> Result<FixedFunctionStyle>
pub fn try_style(&self) -> Result<FixedFunctionStyle>
Return the current style, reporting unknown styles and native errors.
A config may contain a style supported by the native library but not by
the enabled Rust interface feature. Enable the corresponding feature
to represent that style as a FixedFunctionStyle.
Sourcepub fn set_style(&self, style: FixedFunctionStyle)
pub fn set_style(&self, style: FixedFunctionStyle)
Set the fixed-function style, panicking on validation error.
Sourcepub fn try_set_style(&self, style: FixedFunctionStyle) -> Result<()>
pub fn try_set_style(&self, style: FixedFunctionStyle) -> Result<()>
Set the fixed-function style and surface any OCIO validation error.
Sourcepub fn try_num_params(&self) -> Result<i32>
pub fn try_num_params(&self) -> Result<i32>
Return the number of parameters required by the current style.
Sourcepub fn try_num_params_usize(&self) -> Result<usize>
pub fn try_num_params_usize(&self) -> Result<usize>
Return the full native parameter count without narrowing it to i32.
Sourcepub fn num_params(&self) -> i32
pub fn num_params(&self) -> i32
Return the number of parameters required by the current style.
Sourcepub fn try_params(&self) -> Result<Vec<f64>>
pub fn try_params(&self) -> Result<Vec<f64>>
Return the style-specific parameter values.
Sourcepub fn try_params_into(&self, output: &mut [f64]) -> Result<()>
pub fn try_params_into(&self, output: &mut [f64]) -> Result<()>
Copy parameters into an exactly sized buffer without allocating. A length mismatch leaves the buffer unchanged.
Sourcepub fn set_params(&self, params: &[f64]) -> Result<()>
pub fn set_params(&self, params: &[f64]) -> Result<()>
Set the style-specific parameters for this transform.
OCIO may defer style-specific validation until the transform is validated or used to construct a processor.
Sourcepub fn direction(&self) -> TransformDirection
pub fn direction(&self) -> TransformDirection
Return the evaluation direction.
Sourcepub fn set_direction(&self, direction: TransformDirection)
pub fn set_direction(&self, direction: TransformDirection)
Set the evaluation direction, panicking on validation error.
Sourcepub fn try_set_direction(&self, direction: TransformDirection) -> Result<()>
pub fn try_set_direction(&self, direction: TransformDirection) -> Result<()>
Set the transform direction and surface any OCIO validation error.
Sourcepub fn create_editable_copy(&self) -> Result<Self>
pub fn create_editable_copy(&self) -> Result<Self>
Create an editable copy that is independent from the original transform.
Sourcepub fn format_metadata(&self) -> Option<FormatMetadata>
pub fn format_metadata(&self) -> Option<FormatMetadata>
Return format metadata attached to the transform, when available.
pub fn format_metadata_v1(&self) -> Option<FormatMetadata>
compat alias; prefer format_metadata()
pub fn format_metadata_v2(&self) -> Option<FormatMetadata>
compat alias; prefer format_metadata()
Trait Implementations§
Source§impl Drop for FixedFunctionTransform
impl Drop for FixedFunctionTransform
Source§impl TransformHandle for FixedFunctionTransform
impl TransformHandle for FixedFunctionTransform
fn as_ptr(&self) -> *mut c_void
Source§fn diagnostic_text(&self) -> Result<String>
fn diagnostic_text(&self) -> Result<String>
Source§fn try_type_tag(&self) -> Result<i32>
fn try_type_tag(&self) -> Result<i32>
crate::TransformType.Source§fn try_set_direction(&mut self, direction: TransformDirection) -> Result<()>
fn try_set_direction(&mut self, direction: TransformDirection) -> Result<()>
Source§fn try_validate(&self) -> Result<()>
fn try_validate(&self) -> Result<()>
Source§fn try_create_editable_copy(&self) -> Result<Transform>
fn try_create_editable_copy(&self) -> Result<Transform>
GroupTransform::create_deep_copy.