Skip to main content

Region

Struct Region 

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

REGN — Region / submesh (v0–v5, 48 bytes)

Describes a contiguous range of vertices and indices forming a submesh, with bone lookup info for skinning and UV scale/offset for texturing.

Implementations§

Source§

impl Region

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn index(&self) -> u32

Region index

Source

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

Source

pub fn unknown(&self) -> u32

Unknown field

Source

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

Source

pub fn first_vertex(&self) -> u32

First vertex in the vertex buffer

Source

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

Source

pub fn vertex_count(&self) -> u32

Number of vertices

Source

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

Source

pub fn first_index(&self) -> u32

First index in the index buffer

Source

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

Source

pub fn index_count(&self) -> u32

Number of indices (triangles × 3)

Source

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

Source

pub fn unknown_2(&self) -> u16

Unknown field

Source

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

Source

pub fn first_bone_lookup(&self) -> u16

First entry in bone lookup table

Source

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

Source

pub fn bone_lookup_count(&self) -> u16

Number of bone lookup entries

Source

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

Source

pub fn padding(&self) -> u16

Alignment padding

Source

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

Source

pub fn bone_weight_pairs(&self) -> u8

Number of bone weight pairs per vertex

Source

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

Source

pub fn bone_index_pairs(&self) -> u8

Number of bone index pairs per vertex

Source

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

Source

pub fn root_bone(&self) -> u16

Root bone for this region

Source

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

Source

pub fn flags(&self) -> RegionFlag

Region flags (hidden, cloth, etc.)

Source

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

Source

pub fn uv_scale(&self) -> f32

UV coordinate scale factor

Source

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

Source

pub fn uv_offset(&self) -> f32

UV coordinate offset

Source

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

Trait Implementations§

Source§

impl Debug for Region

Source§

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

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

impl Default for Region

Source§

fn default() -> Self

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

impl Drop for Region

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 Region

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.