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.
LookupTable
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.
Scalars
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
Vectors
Vectors are triplets of x, y and z components.
Identifies the VECTORS
legacy attribute.
Normals
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.
Tensors
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.
Implementations§
Trait Implementations§
Source§impl Clone for ElementType
impl Clone for ElementType
Source§fn clone(&self) -> ElementType
fn clone(&self) -> ElementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more