Skip to main content

LodProfile

Struct LodProfile 

Source
pub struct LodProfile { /* private fields */ }

Implementations§

Source§

impl LodProfile

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn flags(&self) -> u16

Source

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

Source

pub fn num_lod_levels(&self) -> u16

Source

pub fn set_num_lod_levels(&mut self, value: u16)

Source

pub fn lod_distance(&self) -> f32

Source

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

Source

pub const fn particle_bone_lod_len() -> usize

Per-LOD particle bone mask index. Only four are stored, but the client drives up to eight LOD levels: it copies [0..3] into its first four slots and then replicates entry [3] into slots 4..7. Number of elements — a fixed-size C++ array.

Source

pub fn particle_bone_lod(&self, index: usize) -> u8

§Panics

If index >= 4, matching Rust slice indexing.

Source

pub fn set_particle_bone_lod(&mut self, index: usize, value: u8)

§Panics

If index >= 4.

Source

pub fn lod_scale_raw(&self) -> u16

Fixed-point LOD scale, applied as lodScaleRaw / 2048.0 and only when flags & 0x08 is set (otherwise the client uses 1.0). This is the pair of bytes previously read as reserved0 + lodFlags; reading it as a u16 explains why the high byte looked like a mirror of flags bit 3, since 0x0800 / 2048 == 1.0.

Source

pub fn set_lod_scale_raw(&mut self, value: u16)

Source

pub fn lod_batch_count(&self) -> u8

Source

pub fn set_lod_batch_count(&mut self, value: u8)

Source

pub fn reserved_1(&self) -> u8

Source

pub fn set_reserved_1(&mut self, value: u8)

Trait Implementations§

Source§

impl Debug for LodProfile

Source§

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

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

impl Default for LodProfile

Source§

fn default() -> Self

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

impl Drop for LodProfile

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 LodProfile

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.