Skip to main content

VertexArray

Struct VertexArray 

Source
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

Source

pub fn from_components(dimension: usize, values: MeteredVec<Component>) -> Self

Takes ownership of already charged components supplied by an API adapter.

Source

pub fn dimension(&self) -> usize

The components of each tuple.

Source

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.

Source

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.

Source

pub fn is_empty(&self) -> bool

Whether it holds no tuple.

Source

pub fn values(&self) -> &Values

The values, flat.

Source

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.

Trait Implementations§

Source§

impl Debug for VertexArray

Source§

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

Formats the value using the given formatter. Read more

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> 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.