Ejemplo n.º 1
0
bool TeamZone::isInside(SpaceObject const& toBeChecked) const {
    switch(homeSide_) {
        case 0:
            return(toBeChecked.location().x_ < SPACE_X_RESOLUTION*0.5f);
        case 1:
            return(toBeChecked.location().x_ > SPACE_X_RESOLUTION*0.5f);
        default :
            return false;
    }
}
Ejemplo n.º 2
0
bool RasterZone::isInside(SpaceObject const& toBeChecked) const {
    return    toBeChecked.location().x_ > bottomLeft_.x_
              && toBeChecked.location().y_ > bottomLeft_.y_
              && toBeChecked.location().x_ < topRight_.x_
              && toBeChecked.location().y_ < topRight_.y_;
}
Ejemplo n.º 3
0
bool TacticalZone::isInside(SpaceObject const& toBeChecked) const {
    return((toBeChecked.location()-location_).lengthSquare() <= radius_*radius_);
}