(mut mesh: TriMesh3d<R>)
| 115 | |
| 116 | impl PyTriMesh3d { |
| 117 | pub fn try_from_generic<R: Real + Element>(mut mesh: TriMesh3d<R>) -> PyResult<Self> { |
| 118 | utils::transmute_take_into::<_, TriMesh3d<f32>, _>(&mut mesh) |
| 119 | .or_else(|| utils::transmute_take_into::<_, TriMesh3d<f64>, _>(&mut mesh)) |
| 120 | .ok_or_else(utils::pyerr_unsupported_scalar) |
| 121 | } |
| 122 | |
| 123 | pub fn as_f32(&self) -> Option<&TriMesh3d<f32>> { |
| 124 | match &self.inner { |