------------------------------------------------------------- Description: Put the very basic info of a mesharea (block) into the provided vector. Arguments: areaBlockVector - vector to append the block to areaType - only append area blocks from this block -------------------------------------------------------------
| 505 | // areaType - only append area blocks from this block |
| 506 | // ------------------------------------------------------------- |
| 507 | void Tr2MeshBase::CollectAreaBlocks( std::vector<TriRenderBatchAreaBlock>& collector, TriBatchType areaType ) const |
| 508 | { |
| 509 | const Tr2MeshAreaVector* areas = GetAreas( areaType ); |
| 510 | for( auto a = areas->begin(); a != areas->end(); ++a ) |
| 511 | { |
| 512 | if( areaType == TRIBATCHTYPE_OPAQUE && !( *a )->IsCastingShadows() ) |
| 513 | { |
| 514 | // skip non-shadow casting areas when collecting areas for overlay rendering: such areas may cause problems |
| 515 | // (for example scaffolding + build effect) |
| 516 | continue; |
| 517 | } |
| 518 | TriRenderBatchAreaBlock ab( std::max( 0, ( *a )->GetIndex() ), std::max( 0, ( *a )->GetCount() ) ); |
| 519 | collector.push_back( ab ); |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | // ------------------------------------------------------------- |
| 524 | // Description: |
no test coverage detected