pub struct Accessor<'a> { /* private fields */ }
Expand description
A typed view into a buffer view.
Implementations§
source§impl<'a> Accessor<'a>
impl<'a> Accessor<'a>
sourcepub fn view(&self) -> Option<View<'a>>
pub fn view(&self) -> Option<View<'a>>
Returns the buffer view this accessor reads from.
This may be None
if the corresponding accessor is sparse.
sourcepub fn offset(&self) -> usize
pub fn offset(&self) -> usize
Returns the offset relative to the start of the parent buffer view in bytes.
This will be 0 if the corresponding accessor is sparse.
sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Returns the number of components within the buffer view - not to be confused with the number of bytes in the buffer view.
sourcepub fn extensions(&self) -> Option<&Map<String, Value>>
pub fn extensions(&self) -> Option<&Map<String, Value>>
Returns extension data unknown to this crate version.
sourcepub fn extension_value(&self, ext_name: &str) -> Option<&Value>
pub fn extension_value(&self, ext_name: &str) -> Option<&Value>
Queries extension data unknown to this crate version.
sourcepub fn dimensions(&self) -> Dimensions
pub fn dimensions(&self) -> Dimensions
Specifies if the attribute is a scalar, vector, or matrix.
sourcepub fn min(&self) -> Option<Value>
pub fn min(&self) -> Option<Value>
Returns the minimum value of each component in this attribute.
sourcepub fn max(&self) -> Option<Value>
pub fn max(&self) -> Option<Value>
Returns the maximum value of each component in this attribute.
sourcepub fn normalized(&self) -> bool
pub fn normalized(&self) -> bool
Specifies whether integer data values should be normalized.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Accessor<'a>
impl<'a> Send for Accessor<'a>
impl<'a> Sync for Accessor<'a>
impl<'a> Unpin for Accessor<'a>
impl<'a> UnwindSafe for Accessor<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more