Skip to main content

MaterialAddData

Struct MaterialAddData 

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

MADD — Material additional data (v0–v3, 140–160 bytes)

Buffer-style material extension storing key–value pairs, hashes, and animation parameters. Added in MODL v30.

Implementations§

Source§

impl MaterialAddData

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn key_name(&self) -> String

Key name (Ref<CHAR>)

Source

pub fn set_key_name(&mut self, value: &str)

Source

pub fn key_hash(&self) -> &[u32]

Key hash values (U32_) Zero-copy view of the underlying std::vector.

Source

pub fn key_hash_mut(&mut self) -> &mut [u32]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_key_hash(&mut self, values: &[u32])

Source

pub fn resize_key_hash(&mut self, count: usize)

Source

pub fn extra_hash(&self) -> &[u32]

Extra hash values (U32_, v2+) Zero-copy view of the underlying std::vector.

Source

pub fn extra_hash_mut(&mut self) -> &mut [u32]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_extra_hash(&mut self, values: &[u32])

Source

pub fn resize_extra_hash(&mut self, count: usize)

Source

pub fn value_path(&self) -> String

Value file path (Ref<CHAR>)

Source

pub fn set_value_path(&mut self, value: &str)

Source

pub fn frequency(&self) -> f32

Animation frequency

Source

pub fn set_frequency(&mut self, value: f32)

Source

pub fn intensity(&self) -> f32

Effect intensity

Source

pub fn set_intensity(&mut self, value: f32)

Source

pub fn hold_time(&self) -> f32

Hold time duration

Source

pub fn set_hold_time(&mut self, value: f32)

Source

pub fn random_hash(&self) -> u32

Random seed hash

Source

pub fn set_random_hash(&mut self, value: u32)

Source

pub fn animation_type(&self) -> u32

Animation type code

Source

pub fn set_animation_type(&mut self, value: u32)

Source

pub fn padding_0(&self) -> u32

Alignment padding

Source

pub fn set_padding_0(&mut self, value: u32)

Source

pub fn loop_count(&self) -> i32

Loop count (-1 = infinite)

Source

pub fn set_loop_count(&mut self, value: i32)

Source

pub fn flags(&self) -> u32

Flags

Source

pub fn set_flags(&mut self, value: u32)

Source

pub fn sub_type(&self) -> u32

Sub-type identifier

Source

pub fn set_sub_type(&mut self, value: u32)

Source

pub fn config_a(&self) -> u32

Configuration parameter A

Source

pub fn set_config_a(&mut self, value: u32)

Source

pub fn config_b(&self) -> u32

Configuration parameter B

Source

pub fn set_config_b(&mut self, value: u32)

Source

pub fn extra_id_0(&self) -> u32

Extra identifier 0 (v3+)

Source

pub fn set_extra_id_0(&mut self, value: u32)

Source

pub fn extra_id_1(&self) -> u32

Extra identifier 1 (v3+)

Source

pub fn set_extra_id_1(&mut self, value: u32)

Trait Implementations§

Source§

impl Debug for MaterialAddData

Source§

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

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

impl Default for MaterialAddData

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for MaterialAddData

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 Send for MaterialAddData

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