pal::CostCalculator class

Contents

Public static functions

static void addObstacleCostPenalty(LabelPosition* lp, pal::FeaturePart* obstacle)
Increase candidate's cost according to its collision with passed feature.
static auto candidateSortGrow(const LabelPosition* c1, const LabelPosition* c2) -> bool
Sorts label candidates in ascending order of cost.
static auto candidateSortShrink(const LabelPosition* c1, const LabelPosition* c2) -> bool
Sorts label candidates in descending order of cost.
static auto finalizeCandidatesCosts(Feats* feat, int max_p, RTree<pal::FeaturePart*, double, 2, double>* obstacles, double bbx[4], double bby[4]) -> int
Sort candidates by costs, skip the worse ones, evaluate polygon candidates.
static void setCandidateCostFromPolygon(LabelPosition* lp, RTree<pal::FeaturePart*, double, 2, double>* obstacles, double bbx[4], double bby[4])
Sets cost to the smallest distance between lPos's centroid and a polygon stored in geoetry field.