コード例 #1
0
ファイル: Area.cpp プロジェクト: ephillipe/mercator
int Area::addToSegment(Segment & s) const
{
    if (!checkIntersects(s)) {
        return -1;
    }
    return s.addArea(this);
}
コード例 #2
0
ファイル: Area.cpp プロジェクト: ephillipe/mercator
void Area::updateToSegment(Segment & s) const
{
    if (!checkIntersects(s)) {
        s.removeArea(this);
        return;
    }
    if (s.updateArea(this) != 0) {
        s.addArea(this);
    }
}