MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / data

Method data

pysplashsurf/src/mesh.rs:436–450  ·  view source on GitHub ↗
(this: Bound<'py, Self>)

Source from the content-addressed store, hash-verified

434 /// View of the attribute data as a numpy array
435 #[getter]
436 pub fn data<'py>(this: Bound<'py, Self>) -> PyResult<Bound<'py, PyUntypedArray>> {
437 use utils::{view_scalar_generic, view_vec_generic};
438 match &this.borrow().inner {
439 PyMeshAttributeData::F32(attr) => match &attr.data {
440 OwnedAttributeData::ScalarU64(data) => view_scalar_generic(data, this.into_any()),
441 OwnedAttributeData::ScalarReal(data) => view_scalar_generic(data, this.into_any()),
442 OwnedAttributeData::Vector3Real(data) => view_vec_generic(data, this.into_any()),
443 },
444 PyMeshAttributeData::F64(attr) => match &attr.data {
445 OwnedAttributeData::ScalarU64(data) => view_scalar_generic(data, this.into_any()),
446 OwnedAttributeData::ScalarReal(data) => view_scalar_generic(data, this.into_any()),
447 OwnedAttributeData::Vector3Real(data) => view_vec_generic(data, this.into_any()),
448 },
449 }
450 }
451}
452
453/// Mesh with attached point and cell attributes

Callers

nothing calls this directly

Calls 2

view_scalar_genericFunction · 0.85
view_vec_genericFunction · 0.85

Tested by

no test coverage detected