18#ifndef TOOL_SNAP_FRAME_H
19#define TOOL_SNAP_FRAME_H
29template <
typename Payload>
43template <
typename Payload>
51template <
typename Payload>
59template <
typename Payload>
81 output.
presentation = { id, std::move( payload->second ) };
SNAP_RESULT Resolve(const SNAP_SOURCE_CONTEXT &aContext) const
std::function< SNAP_RESULT(const SNAP_SOURCE_CONTEXT &, const std::vector< SNAP_CANDIDATE > &)> FEASIBILITY_CALLBACK
std::function< void(const std::string &)> TRACE_CALLBACK
void SetFeasibilityCallback(FEASIBILITY_CALLBACK aCallback)
void SetStickyCandidates(std::vector< SNAP_STABLE_ID > aIds)
Bias the ranking toward candidates accepted on a previous resolve so the chosen snap stays put until ...
void SetTraceCallback(TRACE_CALLBACK aCallback)
void AddCandidate(SNAP_CANDIDATE aCandidate)
void SetRankingHysteresis(double aNormalizedResidual)
Set how strongly a candidate with hysteresis is favoured, as a fraction of the snap radius.
void SetRetainedCandidate(std::optional< SNAP_STABLE_ID > aId)
SNAP_FRAME_OUTPUT< Payload > ResolveSnapFrame(SNAP_FRAME_INPUT< Payload > aInput)
std::optional< SNAP_FRAME_PRESENTATION< Payload > > presentation
std::vector< SNAP_STABLE_ID > accepted