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

Method GetPatternLayerCount

trinity/Eve/SpaceObjectFactory/EveSOFDNA.cpp:1482–1512  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Return the number of layers of this pattern --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1480// Return the number of layers of this pattern
1481// --------------------------------------------------------------------------------
1482size_t EveSOFDNA::GetPatternLayerCount() const
1483{
1484 // do we have a dna command for a pattern?
1485 if( m_patternData )
1486 {
1487 // TODO - PHASE-6
1488 auto applicationData = GetHullPatternApplicationData();
1489 if( nullptr == applicationData )
1490 {
1491 return 0;
1492 }
1493 return applicationData->layerAndProjection.size();
1494 }
1495
1496 // ok lets check for default patterns
1497 if( UsingSof6() )
1498 {
1499 auto applicationData = GetFactionalPatternApplicationData();
1500 if( nullptr != applicationData )
1501 {
1502 return applicationData->layerAndProjection.size();
1503 }
1504 // could not find the hull in the pattern or couldn't find the pattern, so just fall out of this function
1505 }
1506 else if( m_hullDatas[0]->defaultPattern.enabled )
1507 {
1508 // there should be a default pattern!
1509 return 1;
1510 }
1511 return 0;
1512}
1513
1514// --------------------------------------------------------------------------------
1515// Description:

Callers 2

FillMeshAreaVectorMethod · 0.80
SetupCustomMaskMethod · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected