|
Wildmeshing Toolkit
|
The map of a tet mesh's volume between the mesh its volume history starts from and the one it ends at, in the terms of their files: Tracking's counterpart for the volume (simwild, tetwild with volume_history_output). More...
#include <tracking.hpp>
Public Member Functions | |
| VolumeTracking (const history::SurfaceHistory &surface, history::VolumeHistory volume, const MeshData &input_mesh, const MeshData &output_mesh, const VolumeMapOptions &options={}) | |
| VolumeTracking (const history::SurfaceHistory &surface, history::VolumeHistory volume, const VolumeMapOptions &options={}) | |
The map of volume alone, with no meshes to name points by: map_positions() only. | |
| bool | has_meshes () const |
| Whether it has the meshes, which TetPoints are of. | |
| std::vector< TetPoint > | to_output (const std::vector< TetPoint > &points) const |
| Points of the input mesh to the output mesh. Throws without the meshes. | |
| std::vector< TetPoint > | to_input (const std::vector< TetPoint > &points) const |
| Points of the output mesh to the input mesh, the inverse map. Throws without the meshes. | |
| std::vector< VolumePoint > | map_positions (const std::vector< Eigen::Vector3d > &positions, bool forward, const std::vector< uint32_t > ®ions={}) const |
| const VolumeMap & | map () const |
| const TetMeshData & | input_mesh () const |
| The meshes; they throw without them. | |
| const TetMeshData & | output_mesh () const |
Static Public Member Functions | |
| static VolumeTracking | load (const std::string &surface_history, const std::string &volume_history, const std::string &input_mesh, const std::string &output_mesh, const VolumeMapOptions &options={}) |
| The files an application wrote: the two histories and the two meshes. | |
Private Member Functions | |
| std::vector< TetPoint > | map_points (const std::vector< TetPoint > &points, bool forward) const |
Private Attributes | |
| std::shared_ptr< const VolumeMap > | m_map |
| std::optional< TetLocator > | m_in |
| std::optional< TetLocator > | m_out |
The map of a tet mesh's volume between the mesh its volume history starts from and the one it ends at, in the terms of their files: Tracking's counterpart for the volume (simwild, tetwild with volume_history_output).
Built from the surface and volume histories the application saved (see VolumeMap for how), and the two meshes, to name points by: the one the history starts from, which the application writes as <output>_history_input.msh, and the one it ends at – simwild's <output>.msh; for tetwild, the mesh before its filter, <output>_history_output.msh, of which <output>_final.msh holds the part kept (a point of the part dropped has no tet there). On the memory route the histories are the bytes of report["history"] and report["volume_history"], and the meshes the output meshes history_input, and mesh (simwild) or history_output (tetwild). A point keeps its region: where it lands on a face between two, it is named by a tet of its own. One with no tet to land in – outside the mesh given – comes back with no tet (kNoId), as does one that is no point: of a tet the mesh does not have, or with coordinates that are not numbers. Without the meshes, it maps positions (map_positions()).
Its const methods may be called from several threads at once (VolumeMap's are; the meshes are not changed). A copy shares the map, its built operations and its stats, and the meshes.
| wmtk::components::tracking::VolumeTracking::VolumeTracking | ( | const history::SurfaceHistory & | surface, |
| history::VolumeHistory | volume, | ||
| const MeshData & | input_mesh, | ||
| const MeshData & | output_mesh, | ||
| const VolumeMapOptions & | options = {} |
||
| ) |
The map of volume, recorded alongside surface, between input_mesh, where it starts, and output_mesh, where it ends (tet_mesh_data()): what load() reads from the files, as the memory route passes them.
| std::vector< VolumePoint > wmtk::components::tracking::VolumeTracking::map_positions | ( | const std::vector< Eigen::Vector3d > & | positions, |
| bool | forward, | ||
| const std::vector< uint32_t > & | regions = {} |
||
| ) | const |
Positions where the volume history starts mapped to where it ends (forward), or back, each with the region it ends in (an index into map().history().regions, kAnyRegion for one no operation took). regions, if given, has one per position: the region it is in, as a call the other way returned it; else it is the region of the tet an operation first finds it in. A position that is not a number comes back as it is.