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; } }
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_; }
bool TacticalZone::isInside(SpaceObject const& toBeChecked) const { return((toBeChecked.location()-location_).lengthSquare() <= radius_*radius_); }