pub struct DataSetAttributes { /* private fields */ }Expand description
Field data with “active” attribute designations for scalars, vectors, normals, etc.
Analogous to VTK’s vtkDataSetAttributes.
Implementations§
Source§impl DataSetAttributes
impl DataSetAttributes
pub fn new() -> Self
pub fn field_data(&self) -> &FieldData
pub fn field_data_mut(&mut self) -> &mut FieldData
pub fn add_array(&mut self, array: AnyDataArray)
pub fn num_arrays(&self) -> usize
pub fn get_array(&self, name: &str) -> Option<&AnyDataArray>
pub fn get_array_by_index(&self, idx: usize) -> Option<&AnyDataArray>
pub fn set_active_scalars(&mut self, name: &str) -> bool
pub fn set_active_vectors(&mut self, name: &str) -> bool
pub fn set_active_normals(&mut self, name: &str) -> bool
pub fn set_active_tcoords(&mut self, name: &str) -> bool
pub fn set_active_tensors(&mut self, name: &str) -> bool
pub fn scalars(&self) -> Option<&AnyDataArray>
pub fn vectors(&self) -> Option<&AnyDataArray>
pub fn normals(&self) -> Option<&AnyDataArray>
pub fn tcoords(&self) -> Option<&AnyDataArray>
pub fn tensors(&self) -> Option<&AnyDataArray>
Sourcepub fn array_names(&self) -> Vec<&str>
pub fn array_names(&self) -> Vec<&str>
Get all array names.
Sourcepub fn remove_array(&mut self, name: &str) -> Option<AnyDataArray>
pub fn remove_array(&mut self, name: &str) -> Option<AnyDataArray>
Remove an array by name. Adjusts active attribute indices.
Sourcepub fn has_active_attributes(&self) -> bool
pub fn has_active_attributes(&self) -> bool
Check if any active attributes are set.
Sourcepub fn iter(&self) -> impl Iterator<Item = &AnyDataArray>
pub fn iter(&self) -> impl Iterator<Item = &AnyDataArray>
Iterate over all arrays.
Trait Implementations§
Source§impl Clone for DataSetAttributes
impl Clone for DataSetAttributes
Source§fn clone(&self) -> DataSetAttributes
fn clone(&self) -> DataSetAttributes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataSetAttributes
impl Debug for DataSetAttributes
Source§impl Default for DataSetAttributes
impl Default for DataSetAttributes
Source§fn default() -> DataSetAttributes
fn default() -> DataSetAttributes
Returns the “default value” for a type. Read more
Source§impl PartialEq for DataSetAttributes
impl PartialEq for DataSetAttributes
impl StructuralPartialEq for DataSetAttributes
Auto Trait Implementations§
impl Freeze for DataSetAttributes
impl RefUnwindSafe for DataSetAttributes
impl Send for DataSetAttributes
impl Sync for DataSetAttributes
impl Unpin for DataSetAttributes
impl UnsafeUnpin for DataSetAttributes
impl UnwindSafe for DataSetAttributes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more