pub struct MeshSkin {
pub channel: Blend,
pub unlimited: Option<Blend>,
pub bind_poses: Vec<[[f64; 4]; 4]>,
}Expand description
A mesh’s skin as stored, in Unity’s frame: the blend channels (BlendWeight and BlendIndices: up to four
influences a vertex, as Unity draws them at four or fewer), the full influences of a mesh that stores them
(m_VariableBoneCountWeights, which Unity draws only at unlimited skin weights; the channels then hold its first
four renormalised), and per bone the bind pose, the matrix taking the renderer’s local space to the bone’s at bind
time.
Fields§
§channel: BlendBone slots are slots of the renderer’s bone list (m_Bones); a mesh with indices but no weights channel binds
each vertex to its one bone wholly.
unlimited: Option<Blend>The full influences of a mesh that stores more than four a vertex (m_VariableBoneCountWeights); None for a
mesh that does not.
bind_poses: Vec<[[f64; 4]; 4]>m_BindPose, row-major ([row][column], the translation in column 3).
Implementations§
Source§impl MeshSkin
impl MeshSkin
Sourcepub fn outcome(&self, limit: SkinWeights) -> (bool, usize)
pub fn outcome(&self, limit: SkinWeights) -> (bool, usize)
What limit makes of this skin: whether the full influences are drawn, and the most influences a vertex keeps.
Two limits with the same outcome draw the same mesh.
Sourcepub fn sets(&self, limit: SkinWeights) -> usize
pub fn sets(&self, limit: SkinWeights) -> usize
How many sets of four influences a vertex has under limit: at least one.
Sourcepub fn padded(&self, limit: SkinWeights) -> PaddedSets
pub fn padded(&self, limit: SkinWeights) -> PaddedSets
The influences limit draws as sets of four per vertex (weights and bone slots, zero-padded); a vertex with
more influences than the limit keeps its first ones renormalised to sum to 1. Also the vertices cut so.