MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetPatternLayerData

Method GetPatternLayerData

trinity/Eve/SpaceObjectFactory/EveSOFDNA.cpp:1627–1649  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Return pattern layer data, but needs to exist for provided hull! --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1625// Return pattern layer data, but needs to exist for provided hull!
1626// --------------------------------------------------------------------------------
1627const 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:

Callers 2

FillMeshAreaVectorMethod · 0.80
SetupCustomMaskMethod · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected