pub struct VertexArray { /* private fields */ }Expand description
One attribute: len() tuples of dimension() components, as
struct.iter_unpack (or the copy of a Mesh’s skin) gives them, the
values flat in tuple order. A compressed mesh’s arrays are
PackedBitVector.reshape’s lists, whose last tuple may be cut short:
it is a tuple here too, of the components it holds.
Implementations§
Source§impl VertexArray
impl VertexArray
Sourcepub fn from_components(dimension: usize, values: MeteredVec<Component>) -> Self
pub fn from_components(dimension: usize, values: MeteredVec<Component>) -> Self
Takes ownership of already charged components supplied by an API adapter.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
The number of tuples, a last one cut short counted: Python’s
len() of the list UnityPy holds. No values at dimension 0 is no
tuple.
Sourcepub fn tuple_len(&self, tuple: usize) -> Option<usize>
pub fn tuple_len(&self, tuple: usize) -> Option<usize>
The components tuple tuple holds: Self::dimension, or fewer
for a last tuple cut short; None past the tuples.
Sourcepub fn component(&self, tuple: usize, component: usize) -> Option<Component>
pub fn component(&self, tuple: usize, component: usize) -> Option<Component>
Component component of tuple tuple, as a Python float or
int, whichever form holds it; None past the tuples
(Self::len) or past the tuple’s components
(Self::tuple_len: a last tuple cut short holds fewer), where
Python’s index raises IndexError.