MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::EdgePathsBuilderT< MetricToPenalty > Class Template Reference

the class is responsible for finding smallest metric edge paths on a mesh More...

#include <MREdgePathsBuilder.h>

Classes

struct  ReachedVert
 information about just reached vertex (with final metric value) More...
 

Public Member Functions

bool done () const
 returns true if further edge forest growth is impossible
 
float doneDistance () const
 returns path length till the next candidate vertex or maximum float value if all vertices have been reached
 
const VertPathInfoMapvertPathInfoMap () const
 gives read access to the map from vertex to path to it
 

Protected Attributes

MR_NO_UNIQUE_ADDRESS MetricToPenalty metricToPenalty_
 
 EdgePathsBuilderT (const MeshTopology &topology, const EdgeMetric &metric)
 
bool addStart (VertId startVert, float startMetric)
 
ReachedVert reachNext ()
 
bool addOrgRingSteps (const ReachedVert &rv)
 
ReachedVert growOneEdge ()
 the same as reachNext() + addOrgRingSteps()
 
const VertPathInfogetVertInfo (VertId v) const
 returns one element from the map (or nullptr if the element is missing)
 
EdgePath getPathBack (VertId backpathStart) const
 returns the path in the forest from given vertex to one of start vertices
 

Detailed Description

template<class MetricToPenalty>
class MR::EdgePathsBuilderT< MetricToPenalty >

the class is responsible for finding smallest metric edge paths on a mesh

Constructor & Destructor Documentation

◆ EdgePathsBuilderT()

template<class MetricToPenalty >
MR::EdgePathsBuilderT< MetricToPenalty >::EdgePathsBuilderT ( const MeshTopology & topology,
const EdgeMetric & metric )

Member Function Documentation

◆ addOrgRingSteps()

template<class MetricToPenalty >
bool MR::EdgePathsBuilderT< MetricToPenalty >::addOrgRingSteps ( const ReachedVert & rv)

adds steps for all origin ring edges of the reached vertex; returns true if at least one step was added

◆ addStart()

template<class MetricToPenalty >
bool MR::EdgePathsBuilderT< MetricToPenalty >::addStart ( VertId startVert,
float startMetric )

compares proposed metric with best value known for startVert; if proposed metric is smaller then adds it in the queue and returns true

◆ done()

template<class MetricToPenalty >
bool MR::EdgePathsBuilderT< MetricToPenalty >::done ( ) const
inline

returns true if further edge forest growth is impossible

◆ doneDistance()

template<class MetricToPenalty >
float MR::EdgePathsBuilderT< MetricToPenalty >::doneDistance ( ) const
inline

returns path length till the next candidate vertex or maximum float value if all vertices have been reached

◆ getPathBack()

template<class MetricToPenalty >
EdgePath MR::EdgePathsBuilderT< MetricToPenalty >::getPathBack ( VertId backpathStart) const

returns the path in the forest from given vertex to one of start vertices

◆ getVertInfo()

template<class MetricToPenalty >
const VertPathInfo * MR::EdgePathsBuilderT< MetricToPenalty >::getVertInfo ( VertId v) const

returns one element from the map (or nullptr if the element is missing)

◆ growOneEdge()

template<class MetricToPenalty >
auto MR::EdgePathsBuilderT< MetricToPenalty >::growOneEdge ( )

◆ reachNext()

template<class MetricToPenalty >
auto MR::EdgePathsBuilderT< MetricToPenalty >::reachNext ( )

include one more vertex in the final forest, returning vertex-info for the newly reached vertex; returns invalid VertId in v-field if no more vertices left

◆ vertPathInfoMap()

template<class MetricToPenalty >
const VertPathInfoMap & MR::EdgePathsBuilderT< MetricToPenalty >::vertPathInfoMap ( ) const
inline

gives read access to the map from vertex to path to it

Member Data Documentation

◆ metricToPenalty_

template<class MetricToPenalty >
MR_NO_UNIQUE_ADDRESS MetricToPenalty MR::EdgePathsBuilderT< MetricToPenalty >::metricToPenalty_
protected

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