| 1590 | } |
| 1591 | |
| 1592 | int LODShape::FindSqrtLevel(float resolution2, bool noDecal) const |
| 1593 | { |
| 1594 | // find first suitable LOD level |
| 1595 | PoseidonAssert(_nLods >= 1); |
| 1596 | // only normal LOD searched |
| 1597 | int i = 1; |
| 1598 | for (; i < _nLods; i++) |
| 1599 | { |
| 1600 | float aRes = _resolutions[i]; |
| 1601 | if (aRes * aRes > resolution2) |
| 1602 | { |
| 1603 | break; // this one is too rough |
| 1604 | } |
| 1605 | if (aRes >= 900) |
| 1606 | { |
| 1607 | break; // memory LOD |
| 1608 | } |
| 1609 | } |
| 1610 | i--; |
| 1611 | if (noDecal) |
| 1612 | { |
| 1613 | while (i > 0 && _lods[i - 1] && (_lods[i]->GetAndHints() & ClipDecalMask) != ClipDecalNone) |
| 1614 | { |
| 1615 | i--; |
| 1616 | } |
| 1617 | } |
| 1618 | return i; |
| 1619 | } |
| 1620 | |
| 1621 | int LODShape::FindNearestWithoutProperty(int i, const char* property) const |
| 1622 | { |
no test coverage detected