Skip to main content

AllocationTransform

Struct AllocationTransform 

Source
pub struct AllocationTransform { /* private fields */ }
Expand description

Maps values into or out of an OCIO allocation domain.

Implementations§

Source§

impl AllocationTransform

Source

pub fn create() -> Result<Self>

Source

pub fn try_allocation(&self) -> Result<Allocation>

Source

pub fn allocation(&self) -> Allocation

Source

pub fn set_allocation(&self, allocation: Allocation)

Source

pub fn try_set_allocation(&self, allocation: Allocation) -> Result<()>

Set the allocation mode and surface any OCIO validation error.

Source

pub fn try_num_vars(&self) -> Result<i32>

Source

pub fn num_vars(&self) -> i32

Source

pub fn try_vars(&self) -> Result<Vec<f32>>

Source

pub fn try_vars_into(&self, output: &mut [f32]) -> Result<()>

Copy variables into an exactly sized buffer without allocating. A length mismatch leaves the buffer untouched.

Source

pub fn vars(&self) -> Vec<f32>

Source

pub fn set_vars(&self, vars: &[f32]) -> Result<()>

Set allocation-domain parameters.

Source

pub fn try_direction(&self) -> Result<TransformDirection>

Source

pub fn direction(&self) -> TransformDirection

Source

pub fn create_editable_copy(&self) -> Result<Self>

Source

pub fn format_metadata(&self) -> Option<FormatMetadata>

Source

pub fn set_direction(&self, direction: TransformDirection)

Source

pub fn try_set_direction(&self, direction: TransformDirection) -> Result<()>

Set the transform direction and surface any OCIO validation error.

Source

pub fn validate(&self) -> Result<()>

Trait Implementations§

Source§

impl Drop for AllocationTransform

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl TransformHandle for AllocationTransform

Source§

fn as_ptr(&self) -> *mut c_void

Source§

fn diagnostic_text(&self) -> Result<String>

Return OCIO’s diagnostic representation, which may include file paths. This text is not a stable interchange format.
Source§

fn try_type_tag(&self) -> Result<i32>

Return the version-independent tag corresponding to crate::TransformType.
Source§

fn try_set_direction(&mut self, direction: TransformDirection) -> Result<()>

Change the native evaluation direction without modifying the stored parameters.
Source§

fn try_validate(&self) -> Result<()>

Validate the native transform without copying it or building a processor.
Source§

fn try_create_editable_copy(&self) -> Result<Transform>

Create a native editable copy, preserving the concrete transform type. A copied group shares its children with the original. For an independent built-in group graph, use GroupTransform::create_deep_copy.
Source§

fn try_direction(&self) -> Result<TransformDirection>

Query the native direction with validation, for any supported transform.

Auto Trait Implementations§

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.