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

Function view_triangles_generic

pysplashsurf/src/mesh.rs:26–33  ·  view source on GitHub ↗
(
    triangles: &[TriangleCell],
    container: Bound<'py, PyAny>,
)

Source from the content-addressed store, hash-verified

24use std::path::PathBuf;
25
26fn view_triangles_generic<'py>(
27 triangles: &[TriangleCell],
28 container: Bound<'py, PyAny>,
29) -> PyResult<Bound<'py, PyArray2<NumpyUsize>>> {
30 let vertex_indices: &[NumpyUsize] = bytemuck::cast_slice(triangles);
31 let view = utils::view_generic(vertex_indices, &[triangles.len(), 3], container)?.into_any();
32 Ok(view.cast_into::<PyArray2<NumpyUsize>>()?)
33}
34
35fn compute_normals_generic<'py, R: Real + Element>(
36 py: Python<'py>,

Callers 1

trianglesMethod · 0.85

Calls 2

view_genericFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected