TextureProperties

Struct TextureProperties 

Source
pub struct TextureProperties<'a> { /* private fields */ }
Expand description

Proxy type to texture properties.

Implementations§

Source§

impl<'a> TextureProperties<'a>

Source

pub fn alpha(&self) -> Result<Option<f64>, Error>

Returns default alpha value.

Source

pub fn alpha_or_default(&self) -> Result<f64, Error>

Returns default alpha value.

Returns default if the value is not set.

Source

pub fn wrap_mode_u(&self) -> Result<Option<WrapMode>, Error>

Returns wrap mode U.

Source

pub fn wrap_mode_u_or_default(&self) -> Result<WrapMode, Error>

Returns wrap mode U.

Returns default if the value is not set.

Source

pub fn wrap_mode_v(&self) -> Result<Option<WrapMode>, Error>

Returns wrap mode V.

Source

pub fn wrap_mode_v_or_default(&self) -> Result<WrapMode, Error>

Returns wrap mode V.

Returns default if the value is not set.

Source

pub fn uv_swap(&self) -> Result<Option<bool>, Error>

Returns whether the UV should be swapped or not.

Returns Some(true) if UV should be swapped.

Source

pub fn uv_swap_or_default(&self) -> Result<bool, Error>

Returns whether the UV should be swapped or not.

Returns true if UV should be swapped.

Returns default if the value is not set.

Source

pub fn premultiply_alpha(&self) -> Result<Option<bool>, Error>

Returns premultiply-alpha flag.

Returns Some(true) if the alpha is premultiplied.

Source

pub fn premultiply_alpha_or_default(&self) -> Result<bool, Error>

Returns premultiply-alpha flag.

Returns true if the alpha is premultiplied.

Returns default if the value is not set.

Source

pub fn translation(&self) -> Result<Option<Vector3<f64>>, Error>

Returns default translation vector.

Source

pub fn translation_or_default(&self) -> Result<Vector3<f64>, Error>

Returns default translation vector.

Returns default if the value is not set.

Source

pub fn rotation(&self) -> Result<Option<[f64; 3]>, Error>

Returns default rotation vector.

Source

pub fn rotation_or_default(&self) -> Result<[f64; 3], Error>

Returns default rotation vector.

Returns default if the value is not set.

Source

pub fn scaling(&self) -> Result<Option<Vector3<f64>>, Error>

Returns default scaling vector.

Source

pub fn scaling_or_default(&self) -> Result<Vector3<f64>, Error>

Returns default scaling vector.

Returns default if the value is not set.

Source

pub fn rotation_pivot(&self) -> Result<Option<Point3<f64>>, Error>

Returns rotation pivot vector.

Source

pub fn rotation_pivot_or_default(&self) -> Result<Point3<f64>, Error>

Returns rotation pivot vector.

Returns default if the value is not set.

Source

pub fn scaling_pivot(&self) -> Result<Option<Point3<f64>>, Error>

Returns rotation pivot vector.

Source

pub fn scaling_pivot_or_default(&self) -> Result<Point3<f64>, Error>

Returns scaling pivot vector.

Returns default if the value is not set.

Source

pub fn blend_mode(&self) -> Result<Option<BlendMode>, Error>

Returns texture blend mode.

Source

pub fn blend_mode_or_default(&self) -> Result<BlendMode, Error>

Returns texture blend mode.

Returns default if the value is not set.

Source

pub fn uv_set(&self) -> Result<Option<&'a str>, Error>

Returns UV set name.

Source

pub fn uv_set_or_default(&self) -> Result<&'a str, Error>

Returns UV set name.

Returns default if the value is not set.

Methods from Deref<Target = ObjectProperties<'a>>§

Source

pub fn get_property(&self, name: &str) -> Option<PropertyHandle<'a>>

Returns property handle if found.

Trait Implementations§

Source§

impl<'a> Clone for TextureProperties<'a>

Source§

fn clone(&self) -> TextureProperties<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for TextureProperties<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Deref for TextureProperties<'a>

Source§

type Target = ObjectProperties<'a>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'a> Copy for TextureProperties<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for TextureProperties<'a>

§

impl<'a> RefUnwindSafe for TextureProperties<'a>

§

impl<'a> Send for TextureProperties<'a>

§

impl<'a> Sync for TextureProperties<'a>

§

impl<'a> Unpin for TextureProperties<'a>

§

impl<'a> UnwindSafe for TextureProperties<'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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.