[−][src]Struct gut::mesh::attrib::IntrinsicAttribute
An intrinsic attribute type. This differs from Attribute<I>
in that it is explicitly typed
and it is intended to be used for attributes that are "intrinsic" to the specific mesh type.
For instance, the position attribute is intrinsic to polygonal or tetrahedral meshes and point
clouds. Intrinsic attributes define the geometry of the mesh type.
Methods
impl<T, I> IntrinsicAttribute<T, I>
[src]
pub fn with_size(n: usize, def: T) -> Self where
T: Clone,
[src]
T: Clone,
Construct an attribute with a given size.
pub fn from_vec(vec: Vec<T>) -> Self
[src]
Construct an attribute from a given Vec<T>
of data reusing the space aready
allocated by the Vec
.
pub fn from_slice(data: &[T]) -> Self where
T: Clone,
[src]
T: Clone,
Construct an attribute from a given slice of data, by copying the data.
pub fn as_slice(&self) -> &[T]
[src]
Produce a slice to the underlying data.
pub fn as_mut_slice(&mut self) -> &mut [T]
[src]
Produce a mutable slice to the underlying data.
pub fn into_vec(self) -> Vec<T>
[src]
Move the contents of this attribute into a Vec
. This is identical to using the Into
trait.
pub fn as_mut_vec(&mut self) -> &mut Vec<T>
[src]
Get the internal Vec
storing the attribute data. Use this very carefully because it
allows the user to modify the size of the internal vector which may violate intrinsic
properties of
the mesh that this attribute is part of.
pub fn clone_into_vec(&self) -> Vec<T> where
T: Clone,
[src]
T: Clone,
Convert the data stored by this attribute into a vector of the same size.
pub fn copy_into_vec(&self) -> Vec<T> where
T: Copy,
[src]
T: Copy,
Convert the data stored by this attribute into a vector of the same size. This function is
similar to clone_into_vec
but assumes that elements are Copy
. It may also be more performant
than clone_into_vec
.
pub fn iter(&self) -> Iter<T>
[src]
Produce an iterator over the underlying data elements.
pub fn iter_mut(&mut self) -> IterMut<T>
[src]
Produce a mutable iterator over the underlying data elements.
pub fn len(&self) -> usize
[src]
Number of elements stored by this attribute. This is the same as the number of elements in the associated topology.
pub fn is_empty(&self) -> bool
[src]
Check if there are any values in this attribute.
Trait Implementations
impl<T, I> From<Vec<T>> for IntrinsicAttribute<T, I>
[src]
impl<T, I> Into<Vec<T>> for IntrinsicAttribute<T, I>
[src]
impl<T, I> IntoIterator for IntrinsicAttribute<T, I>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T: Clone, I: Clone> Clone for IntrinsicAttribute<T, I>
[src]
fn clone(&self) -> IntrinsicAttribute<T, I>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: PartialEq, I: PartialEq> PartialEq<IntrinsicAttribute<T, I>> for IntrinsicAttribute<T, I>
[src]
fn eq(&self, other: &IntrinsicAttribute<T, I>) -> bool
[src]
fn ne(&self, other: &IntrinsicAttribute<T, I>) -> bool
[src]
impl<T: Debug, I: Debug> Debug for IntrinsicAttribute<T, I>
[src]
impl<T, I: Into<usize>, J: Into<I>> Index<J> for IntrinsicAttribute<T, I>
[src]
impl<T, I: Into<usize>, J: Into<I>> IndexMut<J> for IntrinsicAttribute<T, I>
[src]
impl<T, I> StructuralPartialEq for IntrinsicAttribute<T, I>
[src]
impl<T, I> FromIterator<T> for IntrinsicAttribute<T, I>
[src]
fn from_iter<J>(iter: J) -> Self where
J: IntoIterator<Item = T>,
[src]
J: IntoIterator<Item = T>,
Auto Trait Implementations
impl<T, I> Send for IntrinsicAttribute<T, I> where
I: Send,
T: Send,
I: Send,
T: Send,
impl<T, I> Sync for IntrinsicAttribute<T, I> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<T, I> Unpin for IntrinsicAttribute<T, I> where
I: Unpin,
T: Unpin,
I: Unpin,
T: Unpin,
impl<T, I> UnwindSafe for IntrinsicAttribute<T, I> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
impl<T, I> RefUnwindSafe for IntrinsicAttribute<T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Bytes for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,