Skip to main content

TurretBehavior

Struct TurretBehavior 

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

PATU — Turret behavior (v0–v4, 152 bytes)

Configures turret rotation constraints for a bone with yaw/pitch limits, weights, and an optional main-turret flag.

Implementations§

Source§

impl TurretBehavior

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn unknown_1(&self) -> Vector4f

Unknown vector 1

Source

pub fn set_unknown_1(&mut self, value: Vector4f)

Source

pub fn unknown_2(&self) -> Vector4f

Unknown vector 2

Source

pub fn set_unknown_2(&mut self, value: Vector4f)

Source

pub fn bone_index(&self) -> u16

Index into BONE array

Source

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

Source

pub fn use_as_main_turret(&self) -> u8

Non-zero if this is the main turret

Source

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

Source

pub fn turret_group_id(&self) -> u8

Turret group identifier

Source

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

Source

pub fn yaw_limited(&self) -> u32

Enable yaw limits

Source

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

Source

pub fn yaw_min(&self) -> f32

Minimum yaw angle (radians)

Source

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

Source

pub fn yaw_max(&self) -> f32

Maximum yaw angle (radians)

Source

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

Source

pub fn yaw_weight(&self) -> f32

Yaw rotation weight

Source

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

Source

pub fn pitch_limited(&self) -> u32

Enable pitch limits

Source

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

Source

pub fn pitch_min(&self) -> f32

Minimum pitch angle (radians)

Source

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

Source

pub fn pitch_max(&self) -> f32

Maximum pitch angle (radians)

Source

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

Source

pub fn pitch_weight(&self) -> f32

Pitch rotation weight

Source

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

Source

pub fn unknown_3(&self) -> f32

Unknown field

Source

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

Source

pub fn unknown_4(&self) -> f32

Unknown field

Source

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

Source

pub fn main_bone_offset(&self) -> Vector3f

Offset from main bone

Source

pub fn set_main_bone_offset(&mut self, value: Vector3f)

Trait Implementations§

Source§

impl Debug for TurretBehavior

Source§

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

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

impl Default for TurretBehavior

Source§

fn default() -> Self

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

impl Drop for TurretBehavior

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 TurretBehavior

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.