Skip to main content

StandardMaterial

Struct StandardMaterial 

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

MAT_ — Standard material (v0–v20, 268–352 bytes)

The primary material type with up to 18 texture layers (diffuse, specular, emissive, normal, height, etc.), blend mode, HDR multipliers, and per-version extensions for normal-blend and gloss layers.

Implementations§

Source§

impl StandardMaterial

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn name(&self) -> String

Material name (Ref<CHAR>)

Source

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

Source

pub fn additional_flags(&self) -> MaterialAdditionalFlag

Additional flags

Source

pub fn set_additional_flags(&mut self, value: MaterialAdditionalFlag)

Source

pub fn flags(&self) -> MaterialFlag

Material rendering flags

Source

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

Source

pub fn blend_mode(&self) -> BlendMode

Alpha blend mode

Source

pub fn set_blend_mode(&mut self, value: BlendMode)

Source

pub fn priority(&self) -> i32

Render priority (lower = earlier)

Source

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

Source

pub fn rtt_channels(&self) -> u32

RTT channel mask

Source

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

Source

pub fn specular_exponent(&self) -> f32

Specular highlight exponent

Source

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

Source

pub fn depth_blend_falloff(&self) -> f32

Depth blend falloff distance

Source

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

Source

pub fn alpha_test_threshold(&self) -> u32

Alpha test cut-off value

Source

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

Source

pub fn hdr_specular_multiplier(&self) -> f32

HDR specular multiplier

Source

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

Source

pub fn hdr_emissive_multiplier(&self) -> f32

HDR emissive multiplier

Source

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

Source

pub fn hdr_environment_constant(&self) -> f32

HDR environment constant (v20)

Source

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

Source

pub fn hdr_environment_diffuse(&self) -> f32

HDR environment diffuse (v20)

Source

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

Source

pub fn hdr_environment_specular(&self) -> f32

HDR environment specular (v20)

Source

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

Source

pub fn material_class(&self) -> MaterialClass

Material class (unit, building, etc.)

Source

pub fn set_material_class(&mut self, value: MaterialClass)

Source

pub fn layer_blend_mode(&self) -> LayerBlendOp

Layer blend operation

Source

pub fn set_layer_blend_mode(&mut self, value: LayerBlendOp)

Source

pub fn emissive_blend_mode_1(&self) -> LayerBlendOp

Emissive layer 1 blend mode

Source

pub fn set_emissive_blend_mode_1(&mut self, value: LayerBlendOp)

Source

pub fn emissive_blend_mode_2(&self) -> LayerBlendOp

Emissive layer 2 blend mode

Source

pub fn set_emissive_blend_mode_2(&mut self, value: LayerBlendOp)

Source

pub fn specular_mode(&self) -> SpecularMode

Specular computation mode

Source

pub fn set_specular_mode(&mut self, value: SpecularMode)

Source

pub fn parallax_height(&self) -> Ref<'_, AnimRefF32>

Animated parallax height Borrows the field in place — no copy, no allocation.

Source

pub fn parallax_height_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn motion_blur_amount(&self) -> Ref<'_, AnimRefF32>

Animated motion blur amount Borrows the field in place — no copy, no allocation.

Source

pub fn motion_blur_amount_mut(&mut self) -> RefMut<'_, AnimRefF32>

Source

pub fn normal_blend_factors_len(&self) -> usize

Normal blend factors (v19+)

Source

pub fn normal_blend_factors(&self, index: usize) -> Option<Ref<'_, AnimRefF32>>

Borrows element index in place. None when out of range.

Source

pub fn normal_blend_factors_mut( &mut self, index: usize, ) -> Option<RefMut<'_, AnimRefF32>>

Source

pub fn normal_blend_factors_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, AnimRefF32>>

Iterate the elements, borrowing each in turn.

Source

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

Trait Implementations§

Source§

impl Debug for StandardMaterial

Source§

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

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

impl Default for StandardMaterial

Source§

fn default() -> Self

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

impl Drop for StandardMaterial

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 StandardMaterial

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.