Beispiel #1
0
bool LabelPosition::polygonObstacleCallback( PointSet *feat, void *ctx )
{
    PolygonCostCalculator *pCost = ( PolygonCostCalculator* ) ctx;

    LabelPosition *lp = pCost->getLabel();
    if (( feat == lp->feature ) || ( feat->getHoleOf() && feat->getHoleOf() != lp->feature ) )
    {
        return true;
    }

    pCost->update( feat );

    return true;
}
Beispiel #2
0
  bool LabelPosition::polygonObstacleCallback( FeaturePart *obstacle, void *ctx )
  {
    PolygonCostCalculator *pCost = ( PolygonCostCalculator* ) ctx;

    LabelPosition *lp = pCost->getLabel();
    if (( obstacle == lp->feature ) || ( obstacle->getHoleOf() && obstacle->getHoleOf() != lp->feature ) )
    {
      return true;
    }

    pCost->update( obstacle );

    return true;
  }