-------------------------------------------------------------------------------- Description: Return pattern layer data, but needs to exist for provided hull! --------------------------------------------------------------------------------
| 1625 | // Return pattern layer data, but needs to exist for provided hull! |
| 1626 | // -------------------------------------------------------------------------------- |
| 1627 | const EveSOFDataMgr::PatternLayerData* EveSOFDNA::GetPatternLayerData( const EveSOFDataMgr::PatternApplicationData* patternApplicationData, size_t layer ) const |
| 1628 | { |
| 1629 | if( nullptr == patternApplicationData ) |
| 1630 | { |
| 1631 | return nullptr; |
| 1632 | } |
| 1633 | if( !HasDnaCommand( CMD_PATTERN ) && !UsingSof6() ) |
| 1634 | { |
| 1635 | if( layer > 0 ) |
| 1636 | { |
| 1637 | // only 1 layer for default patterns, might be increased to 2 |
| 1638 | return nullptr; |
| 1639 | } |
| 1640 | // ok no DNA command for a pattern, so we use the default from the hull |
| 1641 | return &patternApplicationData->layerAndProjection[0].first; |
| 1642 | } |
| 1643 | |
| 1644 | if( patternApplicationData->layerAndProjection.size() < layer ) |
| 1645 | { |
| 1646 | return nullptr; |
| 1647 | } |
| 1648 | return &patternApplicationData->layerAndProjection[layer].first; |
| 1649 | } |
| 1650 | |
| 1651 | // -------------------------------------------------------------------------------- |
| 1652 | // Description: |
no test coverage detected