Enum gut::io::vtk::model::ElementType [−]
pub enum ElementType {
ColorScalars(u32),
LookupTable,
Scalars {
num_comp: u32,
lookup_table: Option<String>,
},
Vectors,
Normals,
TCoords(u32),
Tensors,
Generic(u32),
}
Expand description
The type of element being represented inside a DataArray
.
This is used to identify attribute types used by the Legacy VTK format, Additionally, this type
is used to tag active XML DataArray
s as one of Scalars
, Vectors
, Normals
, Tensors
,
and TCoords
as appropriate.
If an XML DataArray
is marked tagged by any variant other than Generic
(or Legacy only types
like ColorScalars
and LookupTable
) then it is considered active. If there is more than one
tagged attribute with the same type, then the first one is considered active.
Variants
ColorScalars(u32)
Color Scalars represent floats in the range 0 to 1.
The number of components per element is represented by the associated integer value.
Identifies the COLOR_SCALARS
legacy attribute. This is a legacy only type.
Tuple Fields of ColorScalars
0: u32
A lookup table element is 4 color components: red, green, blue and alpha.
Identifies the LOOKUP_TABLE
legacy attribute. This is a legacy only type.
A scalar field of 1, 2, 3 or 4 components.
An associated lookup table can be specified corresponding to another attribute.
Identifies the SCALARS
legacy attribute.
Fields of Scalars
Vectors are triplets of x, y and z components.
Identifies the VECTORS
legacy attribute.
Normals are triplets of x, y and z components representing a normal vector.
Normals are assumed to be unit length (normalized).
Identifies the NORMALS
legacy attribute.
TCoords(u32)
Texture coordinates can be 1, 2 or 3 dimensions.
Identifies the TEXTURE_COORDINATES
legacy attribute.
Tuple Fields of TCoords
0: u32
Tensors are 3x3 matrices.
These are given in full row major form:
t_00, t_01, t_02,
t_10, t_11, t_12,
t_20, t_21, t_22,
Note that symmetry is assumed (t_ij == t_ji
).
Identifies the TENSORS
legacy attribute.
Generic(u32)
Generic element with any number of components.
This element type is used to identify fields in the Legacy format.
Tuple Fields of Generic
0: u32
Implementations
impl ElementType
impl ElementType
Trait Implementations
impl Clone for ElementType
impl Clone for ElementType
pub fn clone(&self) -> ElementType
pub fn clone(&self) -> ElementType
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for ElementType
impl Debug for ElementType
impl Default for ElementType
impl Default for ElementType
pub fn default() -> ElementType
pub fn default() -> ElementType
Returns the “default value” for a type. Read more
impl PartialEq<ElementType> for ElementType
impl PartialEq<ElementType> for ElementType
pub fn eq(&self, other: &ElementType) -> bool
pub fn eq(&self, other: &ElementType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &ElementType) -> bool
pub fn ne(&self, other: &ElementType) -> bool
This method tests for !=
.
impl StructuralPartialEq for ElementType
Auto Trait Implementations
impl RefUnwindSafe for ElementType
impl Send for ElementType
impl Sync for ElementType
impl Unpin for ElementType
impl UnwindSafe for ElementType
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> CloneBytes for T where
T: 'static + Clone,
impl<T> CloneBytes for T where
T: 'static + Clone,
pub unsafe fn clone_bytes(
src: &[MaybeUninit<u8>]
) -> Box<[MaybeUninit<u8>], Global>
pub unsafe fn clone_from_bytes(
dst: &mut [MaybeUninit<u8>],
src: &[MaybeUninit<u8>]
)
pub unsafe fn clone_into_raw_bytes(
src: &[MaybeUninit<u8>],
dst: &mut [MaybeUninit<u8>]
)
impl<T> DebugBytes for T where
T: 'static + Debug,
impl<T> DebugBytes for T where
T: 'static + Debug,
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
pub unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])
type Output = <I as GetIndex<'a, S>>::Output
fn at(&self, idx: I) -> Self::Output
fn at(&self, idx: I) -> Self::Output
Return a value at the given index. This is provided as the checked
version of get
that will panic if the equivalent get
call is None
,
which typically means that the given index is out of bounds. Read more
unsafe fn at_unchecked(&self, idx: I) -> Self::Output
unsafe fn at_unchecked(&self, idx: I) -> Self::Output
Return a value at the given index. This is provided as the unchecked
version of get
that has undefined behavior when the index is out of bounds. Read more
type Output = <I as IsolateIndex<S>>::Output
pub unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output
pub fn try_isolate(self, idx: I) -> Option<<S as Isolate<I>>::Output>
impl<T> PartialEqBytes for T where
T: 'static + PartialEq<T>,
impl<T> PartialEqBytes for T where
T: 'static + PartialEq<T>,
pub unsafe fn eq_bytes(a: &[MaybeUninit<u8>], b: &[MaybeUninit<u8>]) -> bool
impl<T, N> PushArrayToVec<N> for T where
T: Clone,
N: Array<T>,
impl<T, N> PushArrayToVec<N> for T where
T: Clone,
N: Array<T>,
pub fn push_to_vec(element: <N as Array<T>>::Array, set: &mut Vec<T, Global>)
pub fn push_to_vec(element: <N as Array<T>>::Array, set: &mut Vec<T, Global>)
This method tells this type how it can be pushed to a Vec
as an array.
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.