Wildmeshing Toolkit
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
wmtk::components::tracking::CurveTracking Class Reference

The map between a curve application's input curves and its output's, read from the tracking file the application wrote (its history_output option), in the terms its files use: Tracking's counterpart for curves (triwild). More...

#include <tracking.hpp>

Public Member Functions

 CurveTracking (const history::CurveHistory &h, const CurveMapOptions &options={})
 
bool output_by_vertices () const
 
std::vector< OutputCurvePoint > to_output (const std::vector< InputCurvePoint > &points, CurveMapWarnings *warnings=nullptr) const
 
std::vector< InputCurvePoint > to_input (const std::vector< OutputCurvePoint > &points, CurveMapWarnings *warnings=nullptr) const
 
std::vector< std::array< uint64_t, 2 > > output_segments () const
 
const std::vector< std::array< uint64_t, 2 > > & input_segments () const
 The segments of the input files, in order, as the history holds them.
 
std::vector< FeaturePoint > feature_points () const
 The input's feature points and where each ended (see FeaturePoint).
 
const CurveMap & map () const
 

Static Public Member Functions

static CurveTracking load (const std::string &path, const CurveMapOptions &options={})
 The tracking file an application wrote.
 

Private Attributes

CurveMap m_map
 
std::vector< uint64_t > m_output_ids
 The output's id of each vertex of the history's last state; empty for a curve output.
 
std::map< uint64_t, uint64_t > m_history_vertex
 Output vertex -> vertex of the last state.
 

Detailed Description

The map between a curve application's input curves and its output's, read from the tracking file the application wrote (its history_output option), in the terms its files use: Tracking's counterpart for curves (triwild).

Built from the history alone; see CurveMap for how. A point that cannot be mapped comes back with no segment and no vertices (kNoId), and the warnings of the call count it. Mapping never changes the object: several threads may map through one at once.

Member Function Documentation

◆ output_by_vertices()

bool wmtk::components::tracking::CurveTracking::output_by_vertices ( ) const
inline

Whether output points are named by vertex pairs (a triangle mesh output) rather than segments.

◆ output_segments()

std::vector< std::array< uint64_t, 2 > > wmtk::components::tracking::CurveTracking::output_segments ( ) const

The output's tracked curves: for an output by vertices, its tracked edges by the output's vertex ids, the pairs an OutputCurvePoint may name; otherwise its segments, by index.

◆ to_input()

std::vector< InputCurvePoint > wmtk::components::tracking::CurveTracking::to_input ( const std::vector< OutputCurvePoint > &  points,
CurveMapWarnings *  warnings = nullptr 
) const

Output points to the input, the inverse map. A point named by vertices may list them in either order, its barycentric coordinates following them.

◆ to_output()

std::vector< OutputCurvePoint > wmtk::components::tracking::CurveTracking::to_output ( const std::vector< InputCurvePoint > &  points,
CurveMapWarnings *  warnings = nullptr 
) const

Input points to the output. warnings, if given, gets where this call found the map not a bijection (CurveMap::to_output).


The documentation for this class was generated from the following files: