Skip to main content

Processed

Struct Processed 

Source
pub struct Processed<'a> { /* private fields */ }
Expand description

What process() leaves on the handler: the vertex count, the index size and buffer, and the attributes the channels and the skin filled.

Implementations§

Source§

impl Processed<'_>

Source

pub fn into_owned(self) -> ProcessedOwned

Moves every array and its charge, without allocating or retaining the source. Compute triangles before this conversion if they are needed.

Source

pub fn vertex_count(&self) -> u64

m_VertexCount.

Source

pub fn use_16bit_indices(&self) -> bool

m_Use16BitIndices.

Source

pub fn index_buffer(&self) -> Option<&IndexBuffer>

m_IndexBuffer: None where the source had none.

Source

pub fn vertices(&self) -> Option<&VertexArray>

m_Vertices.

Source

pub fn normals(&self) -> Option<&VertexArray>

m_Normals.

Source

pub fn tangents(&self) -> Option<&VertexArray>

m_Tangents.

Source

pub fn colors(&self) -> Option<&VertexArray>

m_Colors.

Source

pub fn uv(&self, i: usize) -> Option<&VertexArray>

m_UV0 to m_UV7: uv(i), None past 7.

Source

pub fn bone_weights(&self) -> Option<&VertexArray>

m_BoneWeights.

Source

pub fn bone_indices(&self) -> Option<&VertexArray>

m_BoneIndices.

Source

pub fn bind_pose(&self) -> Option<&VertexArray>

m_BindPose, which a compressed mesh below 5 sets: each matrix’s 16 floats flat, row by row, so a tuple of 16 (UnityPy’s reshape(shape=(4, 4)) gives each as four rows of 4, the last matrix’s rows cut short, then empty, where the count is no multiple of 16).

Source

pub fn get_triangles(&self, meter: &Arc<Meter>) -> Result<Triangles, MeshError>

get_triangles() ([crate::triangles]): the triangles charged to meter, and the work of reading the submeshes counted on it. It changes nothing, so each call reads the submeshes’ indexCounts as the source holds them, where UnityPy’s second call reads the counts its first wrote into a strip’s SubMesh.

Trait Implementations§

Source§

impl<'a> Debug for Processed<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Processed<'a>

§

impl<'a> !UnwindSafe for Processed<'a>

§

impl<'a> Forget for Processed<'a>

§

impl<'a> Freeze for Processed<'a>

§

impl<'a> Move for Processed<'a>

§

impl<'a> Send for Processed<'a>

§

impl<'a> Sync for Processed<'a>

§

impl<'a> Unpin for Processed<'a>

§

impl<'a> UnsafeUnpin for Processed<'a>

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

Source§

type Output = T

Should always be Self
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.