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<'_>
impl Processed<'_>
Sourcepub fn into_owned(self) -> ProcessedOwned
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.
Sourcepub fn vertex_count(&self) -> u64
pub fn vertex_count(&self) -> u64
m_VertexCount.
Sourcepub fn use_16bit_indices(&self) -> bool
pub fn use_16bit_indices(&self) -> bool
m_Use16BitIndices.
Sourcepub fn index_buffer(&self) -> Option<&IndexBuffer>
pub fn index_buffer(&self) -> Option<&IndexBuffer>
m_IndexBuffer: None where the source had none.
Sourcepub fn vertices(&self) -> Option<&VertexArray>
pub fn vertices(&self) -> Option<&VertexArray>
m_Vertices.
Sourcepub fn normals(&self) -> Option<&VertexArray>
pub fn normals(&self) -> Option<&VertexArray>
m_Normals.
Sourcepub fn tangents(&self) -> Option<&VertexArray>
pub fn tangents(&self) -> Option<&VertexArray>
m_Tangents.
Sourcepub fn colors(&self) -> Option<&VertexArray>
pub fn colors(&self) -> Option<&VertexArray>
m_Colors.
Sourcepub fn uv(&self, i: usize) -> Option<&VertexArray>
pub fn uv(&self, i: usize) -> Option<&VertexArray>
m_UV0 to m_UV7: uv(i), None past 7.
Sourcepub fn bone_weights(&self) -> Option<&VertexArray>
pub fn bone_weights(&self) -> Option<&VertexArray>
m_BoneWeights.
Sourcepub fn bone_indices(&self) -> Option<&VertexArray>
pub fn bone_indices(&self) -> Option<&VertexArray>
m_BoneIndices.
Sourcepub fn bind_pose(&self) -> Option<&VertexArray>
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).
Sourcepub fn get_triangles(&self, meter: &Arc<Meter>) -> Result<Triangles, MeshError>
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.