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

Method try_convert

splashsurf_lib/src/lib.rs:229–242  ·  view source on GitHub ↗

Tries to convert the parameters from one [Real] type to another [Real] type, returns `None` if conversion fails

(&self)

Source from the content-addressed store, hash-verified

227
228 /// Tries to convert the parameters from one [Real] type to another [Real] type, returns `None` if conversion fails
229 pub fn try_convert<T: Real>(&self) -> Option<Parameters<T>> {
230 Some(Parameters {
231 particle_radius: self.particle_radius.try_convert()?,
232 rest_density: self.rest_density.try_convert()?,
233 compact_support_radius: self.compact_support_radius.try_convert()?,
234 cube_size: self.cube_size.try_convert()?,
235 iso_surface_threshold: self.iso_surface_threshold.try_convert()?,
236 particle_aabb: map_option!(&self.particle_aabb, aabb => aabb.try_convert()?),
237 enable_multi_threading: self.enable_multi_threading,
238 enable_simd: self.enable_simd,
239 spatial_decomposition: self.spatial_decomposition.clone(),
240 global_neighborhood_list: self.global_neighborhood_list,
241 })
242 }
243}
244
245/// Result data returned when the surface reconstruction was successful

Callers 12

newMethod · 0.45
particles_from_coordsFunction · 0.45
surface_mesh_from_objFunction · 0.45
particles_from_xyzFunction · 0.45
particles_from_jsonFunction · 0.45
parse_particles_from_plyFunction · 0.45
parse_mesh_from_plyFunction · 0.45
particles_from_bgeo_fileFunction · 0.45
reconstruct_surfaceFunction · 0.45
reconstruction_pipelineFunction · 0.45
reconstruction_pipelineFunction · 0.45

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected