MdlControllerType

Struct MdlControllerType 

Source
pub struct MdlControllerType(/* private fields */);
Expand description

Controller type code identifying which property is animated.

Stored as a raw u32 matching the on-disk binary format. Named constants are provided for Ghidra-verified types; unknown codes are preserved losslessly for roundtrip fidelity.

Controller type codes are node-type-specific - the same numeric value may have different semantic meaning on different node types (e.g., Light vs Emitter). The base node types (Position, Orientation, Scale) are shared across all node types.

Base node controller codes verified via MdlNode::InternalParseField (0x00465560). See docs/notes/mdl_mdx.md §Model Formats.

Implementations§

Source§

impl MdlControllerType

Source

pub const POSITION: Self

Position (3 floats: x, y, z). Code 8.

Source

pub const ORIENTATION: Self

Orientation quaternion (4 floats: w, x, y, z). Code 20.

Source

pub const SCALE: Self

Uniform scale (1 float). Code 36.

Source

pub const SELFILLUMCOLOR: Self

Self-illumination color (3 floats: r, g, b). Code 100. Mesh context.

Source

pub const ALPHA: Self

Alpha transparency (1 float). Code 132. Mesh context.

Source

pub const COLOR: Self

Light color (3 floats: r, g, b). Code 76. Light context.

Source

pub const RADIUS: Self

Light radius (1 float). Code 88. Light context.

Source

pub const SHADOW_RADIUS: Self

Shadow radius (1 float). Code 96. Light context.

Source

pub const VERTICAL_DISPLACEMENT: Self

Vertical displacement (1 float). Code 100. Light context.

Note: same raw code as SELFILLUMCOLOR (mesh) and DRAG (emitter).

Source

pub const MULTIPLIER: Self

Light multiplier (1 float). Code 140. Light context.

Source

pub const ALPHA_END: Self

Emitter alpha end (1 float). Code 80.

Source

pub const ALPHA_START: Self

Emitter alpha start (1 float). Code 84.

Source

pub const BIRTHRATE: Self

Emitter birthrate (1 float). Code 88.

Source

pub const BOUNCE_CO: Self

Emitter bounce coefficient (1 float). Code 92.

Source

pub const COMBINETIME: Self

Emitter combine time (1 float). Code 96.

Source

pub const DRAG: Self

Emitter drag (1 float). Code 100.

Source

pub const FPS: Self

Emitter frames per second (1 float). Code 104.

Source

pub const FRAME_END: Self

Emitter frame end (1 float). Code 108.

Source

pub const FRAME_START: Self

Emitter frame start (1 float). Code 112.

Source

pub const GRAV: Self

Emitter gravity (1 float). Code 116.

Source

pub const LIFE_EXP: Self

Emitter life expectancy (1 float). Code 120.

Source

pub const MASS: Self

Emitter mass (1 float). Code 124.

Source

pub const P2P_BEZIER2: Self

Emitter point-to-point bezier control 2 (1 float). Code 128.

Source

pub const P2P_BEZIER3: Self

Emitter point-to-point bezier control 3 (1 float). Code 132.

Source

pub const PARTICLE_ROT: Self

Emitter particle rotation (1 float). Code 136.

Source

pub const RANDVEL: Self

Emitter random velocity (1 float). Code 140.

Source

pub const SIZE_START: Self

Emitter size start (1 float). Code 144.

Source

pub const SIZE_END: Self

Emitter size end (1 float). Code 148.

Source

pub const SIZE_START_Y: Self

Emitter size start Y (1 float). Code 152.

Source

pub const SIZE_END_Y: Self

Emitter size end Y (1 float). Code 156.

Source

pub const SPREAD: Self

Emitter spread (1 float). Code 160.

Source

pub const THRESHOLD: Self

Emitter threshold (1 float). Code 164.

Source

pub const VELOCITY: Self

Emitter velocity (1 float). Code 168.

Source

pub const XSIZE: Self

Emitter X size (1 float). Code 172.

Source

pub const YSIZE: Self

Emitter Y size (1 float). Code 176.

Source

pub const BLUR_LENGTH: Self

Emitter blur length (1 float). Code 180.

Source

pub const LIGHTNING_DELAY: Self

Emitter lightning delay (1 float). Code 184.

Source

pub const LIGHTNING_RADIUS: Self

Emitter lightning radius (1 float). Code 188.

Source

pub const LIGHTNING_SCALE: Self

Emitter lightning scale (1 float). Code 192.

Source

pub const LIGHTNING_SUB_DIV: Self

Emitter lightning subdivision (1 float). Code 196.

Source

pub const LIGHTNING_ZIGZAG: Self

Emitter lightning zigzag (1 float). Code 200.

Source

pub const ALPHA_MID: Self

Emitter alpha mid (1 float). Code 216.

Source

pub const PERCENT_START: Self

Emitter percent start (1 float). Code 220.

Source

pub const PERCENT_MID: Self

Emitter percent mid (1 float). Code 224.

Source

pub const PERCENT_END: Self

Emitter percent end (1 float). Code 228.

Source

pub const SIZE_MID: Self

Emitter size mid (1 float). Code 232.

Source

pub const SIZE_MID_Y: Self

Emitter size mid Y (1 float). Code 236.

Source

pub const RANDOM_BIRTH_RATE: Self

Emitter random birthrate (1 float). Code 240.

Source

pub const TARGET_SIZE: Self

Emitter target size (1 float). Code 252.

Source

pub const NUM_CONTROL_PTS: Self

Emitter number of control points (1 float). Code 256.

Source

pub const CONTROL_PT_RADIUS: Self

Emitter control point radius (1 float). Code 260.

Source

pub const CONTROL_PT_DELAY: Self

Emitter control point delay (1 float). Code 264.

Source

pub const TANGENT_SPREAD: Self

Emitter tangent spread (1 float). Code 268.

Source

pub const TANGENT_LENGTH: Self

Emitter tangent length (1 float). Code 272.

Source

pub const COLOR_MID: Self

Emitter color mid (3 floats: r, g, b). Code 284.

Source

pub const COLOR_END: Self

Emitter color end (3 floats: r, g, b). Code 380.

Source

pub const COLOR_START: Self

Emitter color start (3 floats: r, g, b). Code 392.

Source

pub const DETONATE: Self

Emitter detonate (1 float). Code 502.

Source

pub const fn from_raw(code: u32) -> Self

Creates a controller type from a raw type code.

Source

pub const fn raw(self) -> u32

Returns the raw type code.

Trait Implementations§

Source§

impl Clone for MdlControllerType

Source§

fn clone(&self) -> MdlControllerType

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 Debug for MdlControllerType

Source§

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

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

impl Display for MdlControllerType

Source§

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

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

impl From<MdlControllerType> for u32

Source§

fn from(ct: MdlControllerType) -> u32

Converts to this type from the input type.
Source§

impl From<u32> for MdlControllerType

Source§

fn from(code: u32) -> Self

Converts to this type from the input type.
Source§

impl Hash for MdlControllerType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for MdlControllerType

Source§

fn eq(&self, other: &MdlControllerType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for MdlControllerType

Source§

impl Eq for MdlControllerType

Source§

impl StructuralPartialEq for MdlControllerType

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> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.