(&self)
| 1406 | #[cfg(feature = "vtk_extras")] |
| 1407 | #[cfg_attr(docsrs, doc(cfg(feature = "vtk_extras")))] |
| 1408 | fn to_vtk_attribute(&self) -> Attribute { |
| 1409 | match &self.data { |
| 1410 | OwnedAttributeData::ScalarU64(u64_vec) => { |
| 1411 | Attribute::scalars(&self.name, 1).with_data(u64_vec.clone().into_owned()) |
| 1412 | } |
| 1413 | OwnedAttributeData::ScalarReal(real_vec) => { |
| 1414 | Attribute::scalars(&self.name, 1).with_data(real_vec.clone().into_owned()) |
| 1415 | } |
| 1416 | OwnedAttributeData::Vector3Real(vec3r_vec) => Attribute::scalars(&self.name, 3) |
| 1417 | .with_data(vec3r_vec.iter().flatten().copied().collect::<Vec<R>>()), |
| 1418 | } |
| 1419 | } |
| 1420 | } |
| 1421 | |
| 1422 | impl<'a, R: Real> AttributeData<'a, R> { |
no test coverage detected