-------------------------------------------------------------------------------- Description: Return pattern data, but needs to exist for provided hull! (if available) --------------------------------------------------------------------------------
| 1596 | // Return pattern data, but needs to exist for provided hull! (if available) |
| 1597 | // -------------------------------------------------------------------------------- |
| 1598 | const EveSOFDataMgr::PatternProjectionData* EveSOFDNA::GetPatternProjectionData( const EveSOFDataMgr::PatternApplicationData* patternApplicationData, size_t layer ) const |
| 1599 | { |
| 1600 | if( nullptr == patternApplicationData ) |
| 1601 | { |
| 1602 | return nullptr; |
| 1603 | } |
| 1604 | if( !HasDnaCommand( CMD_PATTERN ) && !UsingSof6() ) |
| 1605 | { |
| 1606 | if( layer > 0 ) |
| 1607 | { |
| 1608 | // only 1 layer for default patterns, might be increased to 2 |
| 1609 | return nullptr; |
| 1610 | } |
| 1611 | // ok no DNA command for a pattern, so we use the default from the hull |
| 1612 | return &patternApplicationData->layerAndProjection[0].second; |
| 1613 | } |
| 1614 | |
| 1615 | if( patternApplicationData->layerAndProjection.size() < layer ) |
| 1616 | { |
| 1617 | return nullptr; |
| 1618 | } |
| 1619 | return &patternApplicationData->layerAndProjection[layer].second; |
| 1620 | } |
| 1621 | |
| 1622 | |
| 1623 | // -------------------------------------------------------------------------------- |