You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: splashsurf_lib/src/lib.rs
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@
12
12
//! In particular it adds `From` impls for the [mesh](crate::mesh) types used by this crate to convert them to
13
13
//! [`vtkio::model::UnstructuredGridPiece`](https://docs.rs/vtkio/0.6.*/vtkio/model/struct.UnstructuredGridPiece.html) and [`vtkio::model::DataSet`](https://docs.rs/vtkio/0.6.*/vtkio/model/enum.DataSet.html)
14
14
//! types. If the feature is enabled, The crate exposes its `vtkio` dependency as `splashsurflib::vtkio`.
15
+
//! - **`io`**: Enables the [`io`] module, containing functions to load and store particle and mesh files
16
+
//! from various file formats, e.g. `VTK`, `OBJ`, `BGEO` etc. This feature implies the `vtk_extras` feature.
17
+
//! It is disabled by default because a pure "online" surface reconstruction might not need any file IO.
18
+
//! The feature adds several dependencies to support the file formats.
15
19
//! - **`profiling`**: Enables profiling of internal functions. The resulting data can be displayed using the functions
16
20
//! from the [`profiling`] module. Furthermore, it exposes the [`profile`] macro that can be used e.g.
17
21
//! by binary crates calling into this library to add their own profiling scopes to the measurements.
/// Returns a reference to the virtual background grid that was used as a basis for discretization of the density map for marching cubes, can be used to convert the density map to a hex mesh (using [sparse_density_map_to_hex_mesh](density_map::sparse_density_map_to_hex_mesh))
272
+
/// Returns a reference to the virtual background grid that was used as a basis for discretization of the density map for marching cubes, can be used to convert the density map to a hex mesh (using [`density_map::sparse_density_map_to_hex_mesh`])
Copy file name to clipboardExpand all lines: splashsurf_lib/src/traits.rs
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -31,17 +31,17 @@ pub trait Index:
31
31
+ ThreadSafe
32
32
+ 'static
33
33
{
34
-
/// Converts the value to the specified [Real] type. If the value cannot be represented by the target type, `None` is returned.
34
+
/// Converts this value to the specified [`Real`] type `T` by converting first to `f64` followed by `T::from_f64`. If the value cannot be represented by the target type, `None` is returned.
35
35
fnto_real<R:Real>(self) -> Option<R>{
36
36
R::from_f64(self.to_f64()?)
37
37
}
38
38
39
-
/// Converts the value to the specified [Real] type, panics if the value cannot be represented by the target type.
39
+
/// Converts this value to the specified [`Real`] type, panics if the value cannot be represented by the target type.
40
40
fnto_real_unchecked<R:Real>(self) -> R{
41
41
R::from_f64(self.to_f64().unwrap()).unwrap()
42
42
}
43
43
44
-
/// Multiplies the value by the specified `i32` coefficient. Panics if the coefficient cannot be converted into the target type.
44
+
/// Multiplies this value by the specified `i32` coefficient. Panics if the coefficient cannot be converted into the target type.
/// Tries to convert this value to another [`Real`] type `T` by converting first to `f64` followed by `T::from_f64`. If the value cannot be represented by the target type, `None` is returned.
54
55
fntry_convert<T:Real>(self) -> Option<T>{
55
56
Some(T::from_f64(self.to_f64()?)?)
56
57
}
57
58
59
+
/// Tries to convert the values of a statically sized `nalgebra::SVector` to another type, same behavior as [`Real::try_convert`]
0 commit comments