Expand description
Library for surface reconstruction of SPH particle data using marching cubes.
Entry points are the reconstruct_surface or reconstruct_surface_inplace functions.
§Feature flags
The following features are all non-default features to reduce the amount of additional dependencies.
vtk_extras: Enables helper functions and trait implementations to export meshes usingvtkio. In particular it addsFromimpls for the mesh types used by this crate to convert them tovtkio::model::UnstructuredGridPieceandvtkio::model::DataSettypes. If the feature is enabled, The crate exposes itsvtkiodependency assplashsurflib::vtkio.io: Enables theiomodule, containing functions to load and store particle and mesh files from various file formats, e.g.VTK,OBJ,BGEOetc. This feature implies thevtk_extrasfeature. It is disabled by default because a pure “online” surface reconstruction might not need any file IO. The feature adds several dependencies to support the file formats.profiling: Enables profiling of internal functions. The resulting data can be displayed using the functions from theprofilingmodule of this crate. Furthermore, it exposes theprofilemacro that can be used e.g. by binary crates calling into this library to add their own profiling scopes to the measurements. If this features is not enabled, the macro will just expend to a no-op and remove the (small) performance overhead of the profiling.serde-serialize: EnablesSerializeandDeserializeimpls for some types usingserde.
Re-exports§
pub use crate::density_map::DensityMap;pub use crate::uniform_grid::UniformGrid;pub use nalgebra;pub use vtkio;
Modules§
- dense_
subdomains - density_
map - Computation of sparse density maps (evaluation of particle densities and mapping onto sparse grids)
- generic_
tree - Generic tree visitation functions that can be used with tree-like structures
- halfedge_
mesh - Basic implementation of a half-edge based triangle mesh
- io
io - Convenience functions for importing particle data and meshes from various file formats
- kernel
- SPH kernel function implementations
- marching_
cubes - Triangulation of
DensityMaps using marching cubes - mesh
- Basic mesh types used by the library and implementation of VTK export
- neighborhood_
search - Simple neighborhood search based on spatial hashing
- postprocessing
- Functions for post-processing of surface meshes (decimation, smoothing, etc.)
- profiling
profiling - Implementation details for the
profilemacro - sph_
interpolation - Functions for interpolating quantities (e.g. normals, scalar fields) by evaluating SPH sums
- topology
- Helper types for cartesian coordinate system topology
- uniform_
grid - Helper types for the implicit background grid used for marching cubes
Macros§
- profile
profiling - Creates a scope for profiling
Structs§
- Axis
Aligned Bounding Box - Type representing an axis aligned bounding box in arbitrary dimensions
- Grid
Decomposition Parameters - Parameters for the uniform grid-based spatial decomposition
- Parameters
- Parameters for the surface reconstruction
- Surface
Reconstruction - Result data returned when the surface reconstruction was successful
Enums§
- Reconstruction
Error - Error type returned when the surface reconstruction fails
- Spatial
Decomposition - Approach used for spatial decomposition of the surface reconstruction and its parameters
Traits§
- Index
- Trait that has to be implemented for types to be used as background grid cell indices in the context of the library
- Real
- Trait that has to be implemented for types to be used as floating points values in the context of the library (e.g. for coordinates, density values)
- Real
Convert - Trait for converting values, matrices, etc. from one
Realtype to another. - Thread
Safe - Convenience trait that combines
SendandSync
Functions§
- grid_
for_ reconstruction - Constructs the background grid for marching cubes based on the parameters supplied to the surface reconstruction
- initialize_
thread_ pool - Initializes the global thread pool used by this library with the given parameters.
- reconstruct_
surface - Performs a marching cubes surface construction of the fluid represented by the given particle positions
- reconstruct_
surface_ inplace - Performs a marching cubes surface construction of the fluid represented by the given particle positions, in-place