! \brief Sort two VectorInt64 p1 and p2 to satisfy p1 <= p2 according to * the value of X or Y coordinate, which depends on sortByX param. */
| 208 | * the value of X or Y coordinate, which depends on sortByX param. |
| 209 | */ |
| 210 | void CullingManager::sort(VectorInt64& p1, VectorInt64& p2, bool sortByX) |
| 211 | { |
| 212 | if (sortByX) |
| 213 | { |
| 214 | if (p1.x > p2.x) |
| 215 | std::swap(p1, p2); |
| 216 | } |
| 217 | else |
| 218 | { |
| 219 | if (p1.y > p2.y) |
| 220 | std::swap(p1, p2); |
| 221 | } |
| 222 | } |
| 223 | |
| 224 |